GitHub OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

GitHub DNS IP About 1,161 words

错误原因

最近使用GitHub,不管是git pull还是git push,经常是连接超时,今天直接报SSL_ERROR_SYSCALL

搜索到的解决方法(未生效)

方法一:

git config --global --unset http.proxy

方法二:

git config --global --add remote.origin.proxy ""

尝试解决

查询谷歌 DNS

nslookup github.com 8.8.8.8

返回:

PS C:\> nslookup github.com 8.8.8.8
服务器:  dns.google
Address:  8.8.8.8

非权威应答:
名称:    github.com
Address:  13.250.177.223

查询 114 DNS

nslookup github.com 114.114.114.114

返回:

PS C:\> nslookup github.com 114.114.114.114
服务器:  public1.114dns.com
Address:  114.114.114.114

非权威应答:
名称:    github.com
Address:  52.74.223.119

配置 hosts 文件

将两个IP地址13.250.177.22352.74.223.119分配常识配置到hosts文件后,执行ipconfig /flushdns刷新DNS,但均无效。

最终解决方法

登录 IP Address 网站,查询github.com域名对应的信息,最后查得IP地址为140.82.112.3(经常会变,可能需要实时查看更新),将其配置到hosts文件后,访问/拉取/推送都正常了。

常见 IP

如果IP Address上显示的IP地址ping发现超时,可更换以下几个IP,选择一个ping延迟低且不超时的IP,配置到hosts文件中。

140.82.112.3 github.com
#140.82.112.4 github.com
#140.82.113.3 github.com
#140.82.113.4 github.com
#140.82.114.3 github.com
#140.82.114.4 github.com

备注

raw.githubusercontent.com连接不上同样,也可以使用该方法。

Failed connect to raw.githubusercontent.com:443; Connection refused

相关网址

https://www.ipaddress.com

https://github.com.ipaddress.com

Views: 6,437 · Posted: 2021-03-29

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh