当前位置:   article > 正文

Git clone报错:fatal: unable to access ‘https://github.com/.....‘: Failed to connect to github.com port_git clone unable to access failed connect

git clone unable to access failed connect

使用Git克隆项目是,有时候会报错:Failed to connect to github.com port 443 after 21096 ms: Couldn’t connect to server
原因是本机代理端口和git端口不一致。

我的解决方法:

先关掉梯子,如果开了的话。

然后开启手动代理模式:
在这里插入图片描述

修改Git端口号

随便在哪个地方,右键选择Git Bash Here(得安装了Git),然后在弹出的命令行窗口中分别输入一下内容然后回车:

git config --global http.proxy http://127.0.0.1:端口号
git config --global https.proxy http://127.0.0.1:端口号
  • 1
  • 2

端口号就是刚才开启代理模式的端口号。
然后就可以了,亲测有效。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/983329
推荐阅读
相关标签
  

闽ICP备14008679号