Pycharm上传代码报错

报错内容

successfully created project ‘xxx’ on github, but initial push failed: unable to access ‘xxx’: failed to connect to github.com port 443 after 133527 ms: connection timed out

解决方案

在 Git 中设置全局的 HTTP 代理。通过设置代理,Git 可以通过该代理服务器与远程存储库进行通信。

git config --global http.proxy 127.0.0.1:7890

–global 表示将此配置应用于全局范围,即适用于当前用户的所有 Git 仓库。
http.proxy 是要设置的代理配置项的名称。
127.0.0.1:7890 是代理服务器的地址和端口号。在此示例中,代理服务器的地址是 127.0.0.1,端口号是 7890

更多推荐