git clone :Failed to connect to github.com port 443: Operation timed out

在终端 执行git clone 报错如下:

fatal: unable to access 'https://github.com/xxx/zzzz.git/': Failed to connect to github.com port 443: Operation timed out

但是直接在浏览器又能够访问github网址, 这个时候就是代理问题

  • 执行git config --list 发现代理设置的有问题, 重新添加代理
git config --global http.proxy http://127.0.0.1:1080

git config --global https.proxy https://127.0.0.1:1080
  • 移除代理指令
git config --global --unset http.proxy

git config --global --unset https.proxy

另外 访问公司内网gitlab访问不通, 并且ping不通, 报错如下信息

ping gitlab.xxxx.com.cn ping: cannot resolve gitlab.xxxx.com.cn: unknown host

网上查找了试了各种办法,还是没解决, 最后找的公司网络技术 就给改了DNS服务, 改成自动获取, 移除了原来的114.114.114.114尽然可以访问.....

你可能感兴趣的:(git clone :Failed to connect to github.com port 443: Operation timed out)