Git无法下载github上的源代码
代理的情况
问题 :Failed to connect to github.com port 443 after 21100 ms: Couldn't connect to server
提示我们需要为Git单独配置代理。
- 查看我们的代理端口
为git
设置全局代理
git config --global http.proxy 127.0.0.1:<你的端口号>
比如:
git config --global http.proxy 127.0.0.1:7890
备注 :Clash 代理一般就是7890端口
然后再
git clone
就不会出现connect
的问题了
非代理情况
如果你并未使用VPN,但依然遇到端口443连接失败的问题,尝试取消Git的代理设置:
git config --global --unset http.proxy
