美文网首页
Failed to connect to github.com

Failed to connect to github.com

作者: Hynsen | 来源:发表于2021-06-07 17:30 被阅读0次

试了网上的两种种解决方案:https://www.jianshu.com/p/a2cc1bb2c8ed,感谢博主的总结

一:

1.在终端输入 sudo vim /etc/hosts

2.将Github相关的几行代码注释掉,像这样↓

二:

设置代理

git config --globalhttp.proxy http://127.0.0.1:1080

git config --globalhttps.proxy http://127.0.0.1:1080

或者取消代理

git config --global --unset http.proxy

git config --global --unset https.proxy

两种方式我都操作了,依然没有解决掉我这边的问题,继续探究

使用sudo vim /etc/hosts,发现github IP地址为192.30.253.113

通过查询www.github.com的IP地址发现已经更换为140.82.112.3

博主最后通过校正hosts里GitHub的IP地址解决了问题,但是依然没有解决掉我这边的问题,最后再和公司大佬的交流过程中经大佬指点找到了解决办法:

在Chrome应用商店下载安装GitHub加速器这个插件,使用镜像地址很快就clone下来了,简单有效,mark一下

相关文章

网友评论

      本文标题:Failed to connect to github.com

      本文链接:https://www.haomeiwen.com/subject/alaleltx.html