使用Git克隆项目是,有时候会报错:Failed to connect to github.com port 443 after 21096 ms: Couldn’t connect to server
原因是本机代理端口和git端口不一致。
我的解决方法:
先关掉梯子,如果开了的话。
然后开启手动代理模式:
修改Git端口号
随便在哪个地方,右键选择Git Bash Here(得安装了Git),然后在弹出的命令行窗口中分别输入一下内容然后回车:文章来源:https://www.toymoban.com/news/detail-850387.html
git config --global http.proxy http://127.0.0.1:端口号
git config --global https.proxy http://127.0.0.1:端口号
端口号就是刚才开启代理模式的端口号。
然后就可以了,亲测有效。文章来源地址https://www.toymoban.com/news/detail-850387.html
到了这里,关于Git clone报错:fatal: unable to access ‘https://github.com/.....‘: Failed to connect to github.com port的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!