1. 程式人生 > >github-share報錯無法讀取遠程倉庫

github-share報錯無法讀取遠程倉庫

github上 推薦 創建倉庫 文件夾 總結 not 訪問 ould 三次

報錯:github Could not read from remote repository

1.github創建倉庫成功,而push報告此錯誤

2.考慮遠程倉庫名與本地項目名/文件夾名不匹配

3.修改以致匹配再次提交,成功.

錯誤排查階段,重裝了git,配置了github公鑰,設置了本地訪問github token,以及idea相關git的配置,順路總結如下:

1.下載git, 地址: https://git-scm.com/downloads ,此處下載安裝的是windows版本.

2.idea配置本地git所在路徑,並測試版本信息,如下圖:

技術分享圖片

3.安裝,配置本地用戶信息,name + email

  打開 git.bash , 如下:

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"

3.生成本地公鑰/私鑰,直接三次回車,不推薦設置密碼,將在本地用戶文件夾下生成 .ssh文件夾,內有一個私鑰 id_rsa 和一個公鑰 id_rsa.pub

ssh-keygen -t rsa

4.github上配置ssh公鑰

技術分享圖片

5.idea設置本地登陸github token

技術分享圖片

github-share報錯無法讀取遠程倉庫