14: ssh: connect to host github.com port 22: Connection timed out的解決


公鑰已經加到git上,可是本地依然報錯:

  ssh: connect to host github.com port 22: Connection timed out
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.

解決:1:執行 ssh -T git@github.com, 依然報錯。

          2: 執行  cd ~/.ssh, 建一個文件config, 文件內容如下:

Host github.com
User XXXXXXX@XXX.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

         3: 再執行ssh -T git@github.com 就可以了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM