Failed to connect to github.com port 443 Timed out

git 命令行问题集合

chinaz查询对应网址的耗时情况,查看可用ip。

OpenSSL SSL_read: Connection was reset, errno 10054

连接超时
首先,造成这个错误很有可能是网络不稳定,连接超时导致的,如果再次尝试后依然报错,可以执行下面的命令。

打开Git命令页面,执行git命令脚本:修改设置,解除ssl验证
1
git config --global http.sslVerify "false"

git push失败,但浏览器可以正常访问github.com

代理导致

1
git config --global --unset http.proxy

修改host

host文件路径 C:\Windows\System32\drivers\etc\HOSTS
我们把 13.250.177.223 github.com 添加到 hosts 文件

在shell 命令行中,刷新host设置
1
ipconfig /flushdns

本文作者: 孟 虎
本文链接: https://menghu1994.github.io/blog/2023/10/Git/gitpush%E8%AE%BF%E9%97%AE%E5%A4%B1%E8%B4%A5/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!