- 问题
- Windows下
- linux下
- 设置代理
Failed to connect to gitclone.com port 443: Connection timed out
ping github.com
此时应该是ping不同的,这是DNS服务器解析的问题,需要修改hosts。
Windows下hosts路径:C:WindowsSystem32driversetchosts
添加以下内容:
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



