2021-03-05 14:59:19 卢浮宫 版权声明:本文为站长原创文章,转载请写明出处
最近在登录github和拉取及提交代码时经常失败。
常见错误如下:
Push failed: Unable to access 'https://github.com/BXXXger.git/': Failed to connect to github.com port 443: Timed out
Push failed: Unable to access 'https://github.com/BXXXer.git/': OpenSSL SSL_read: Connection was reset, errno 10054
Push failed: Unable to access 'https://github.com/BXXXger.git/':
SSL: no alternative certificate subject name matches target host name 'github.com'
① 有时是因为域名DNS解析问题
② 网络不通畅
③ 被墙了
使用 win + R 调出命令控制台输入 ping github.com
① 在电脑中找到如下路径:C:\Windows\System32\drivers\etc
② 里面有一个hosts文件,使用文本编辑器打开
③ 然后在最下面加上如下信息(以你上述操作中获取的ip为准):
52.74.233.119 github.com
199.232.69.194 github.com
① 同样使用 win + r 打开命令控制台
② 输入: ipconfig /flushdns
通过上述操作,一般来说多数问题能够得到缓解或解决。
站长经过测试后确实解决了我当下的问题,希望也能对你有所帮助!
更多精彩,请持续关注:guangmuhua.com