关于 PyCharm 无法 Git clone 成功的问题:

Failed to connect to github.com port 443 after 21137 ms: Could not connect to server

场景:已经开启 Clash,且能 Ping 通 github 官网,浏览器也能正常打开 github 网站,但不论开启 Clash 还是关闭 Clash,均无法正常克隆项目

解决方法:Git 不会直接使用 Clash 的代理,需要手动设置系统代理:

1
2
3
git config --global http.proxy http://127.0.0.1:7890

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

这里用作记录,防止以后需要重新修改系统代理