git:Failed to connect to gitclone.com port 443: Connection timed out
作者:互联网
文章目录
问题
Failed to connect to gitclone.com port 443: Connection timed out
ping github.com
此时应该是ping
不同的,这是DNS服务器解析的问题,需要修改hosts
。
Windows下
hosts路径:C:\Windows\System32\drivers\etc\hosts
添加以下内容:
192.30.255.112 github.com git
185.31.16.184 github.global.ssl.fastly.net
能ping通往往问题不大。如果有问题的话,可以尝试一下ipconfig/flushdns
来刷新缓存
linux下
hosts路径: /etc/hosts
添加以下内容:
192.30.255.112 github.com git
185.31.16.184 github.global.ssl.fastly.net
设置代理
如果有VPN
,可以尝试一下方法
解决方案:
git config --global http.proxy "localhost:1080”
如需要取消:
git config --global --unset http.proxy
标签:git,gitclone,443,global,ping,github,hosts,com 来源: https://blog.csdn.net/an__jing_/article/details/122278755