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