Failed to connect to github.com port 443 after 21080 ms: Timed out
OpenSSL SSL_read: Connection was reset, errno 10054
网上有很多种方法,总结来说包括:
1、命令行输入
git config --global http.sslVerify "false"
2、hosts文件添加github.com的ip
▷ GitHub.com : GitHub: Where the world builds software · GitHub (ipaddress.com)
在该网站输入github.com找到其ip复制到
C:\Windows\System32\drivers\etc\hosts文件中,如下是我找到的ip:
这些方法都可以在这里找到Failed to connect to github.com port 443 Timed out | Echo Blog (houbb.github.io),但都对我没有什么用,我的方法是在github上添加自己电脑的ssh密钥,并通过ssh链接来clone代码:
查看是否有SSH Key:
没有就通过以下命令生成:
ssh-keygen -t rsa -C “xxx@xxx.com”
其中xxx@xxx.com是你的github注册邮箱。
然后查看并复制id_rsa.pub文件的内容到github上:
Title随便起,复制刚刚的内容到Key然后添加即可。
使用ssh链接