【高效生活】git :connect to host github.com port 22: Connection refused
阿新 • • 發佈:2018-12-25
【前言】
記錄一下使用git 遇到的幾個問題,有相同問題的小夥伴可以借鑑下思路。
【正文】
安裝完成後,報如上錯誤:
ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
可能情況:a.私鑰公鑰不匹配 (處理方案:重新生成鑰匙對覆蓋原有公鑰私鑰,將新的公鑰放入gitlib)
b.詢問git管理員給你配置的許可權是否充足,開發者在其他人的私有專案中是沒有push許可權的。
c.埠是否正確:檢視是否是ssh預設的22埠,如果不是命令上要新增指定埠(
新增remote:git remote add origin ssh://[email protected]:9922/xxx/CriminalIntent.git
另一個電腦clone:
git clone ssh://[email protected]:9922/xxx/CriminalIntent.git
)