1. 程式人生 > >git clone failed. Could not read from remote repository

git clone failed. Could not read from remote repository

問題:

  在使用git克隆gitee或者github上面的專案時,能夠連線上卻無法下載下來!

解決:

       1、在本地開啟git bash 執行  

         檢查是否有設定賬戶名

      git config user.name

      如果沒有,設定賬戶名

      git config --global user.name "git賬戶名"

   生成ssh公鑰和私鑰,直接enter就可以,注意記下位置(找到id_rsa.pub檔案)
      ssh-keygen -t rsa -C "git賬戶名"

      

  2、開啟gitee,進入設定--->ssh公鑰(github也是一樣的操作  settngs--->SSH and GPG keys)

      建立公鑰,將id_rsa.pub檔案內容填入

       而後就可以clone自己需要的專案!