fatal: unable to access 'https://github.com/xx/xxx.git/': Failed to connect to github.com
port 443: Connection refused
今天拉取仓库代码突然出现这个问题,现将解决方法分享如下:
查询github的IP
点开此链接,查询github.com的IP
修改hosts文件
window:在C:\Windows\System32\drivers\etc\hosts中,加上
140.82.113.4 github.com
(记得保存)
刷新DNS缓存
Windows更新DNS缓存: 在cmd命令窗口执行:
ipconfig/flushdns
出现上图提示之后,你再去git clone 对应代码仓的代码应该就OK了!!!