问题概述:fatal: unable to access 'https://github.com/xxxx-main.git/': Failed to connect to github.com port 443 after 21108 ms: Couldn't connect to server

解决步骤:

1. 取消代理设置(除 Git 的代理设置,让其直接连接网络进行操作)

git config --global --unset http.proxy 
git config --global --unset https.proxy

2. 设置新的系统代理

将端口设置为7890(这个端口不会影响正常上网,可以放心设置),然后点击保存

然后在终端输入以下命令,设置 Git 使用本地代理:

git config --global http.proxy http://127.0.0.1:7890

设置完成后,可以通过以下命令检验是否设置成功:

git config --global -l

参考教程

https://blog.csdn.net/qq_43546721/article/details/139506583

更多推荐