1.问题重述

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

2. 解决方案

22端口用不了,换一个端口443,
GitHub 支持通过 443 端口进行 SSH 连接,找下面这个路径的文件
C:\Users<用户名>.ssh\config

在这里插入图片描述
记事本打开,最下面加上

Host github.com
  Hostname ssh.github.com
  User git
  Port 443

上面这个不用修改,作用是让ssh.github.com时通过443端口建立连接

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐