Vscode 解决 git插件Failed to connect to github.com port 443 connection timed out
在命令行输入
git config --global --unset http.proxy
git config --global --unset https.proxy
取消全局代理
原因可能是
代理设置不当或冲突
- 若之前手动设置过 Git 全局代理(如
git config --global http.proxy ...
),但代理服务器未启动、端口错误或失效(如本地代理工具未运行、端口与配置不符),会导致 Git 通过无效代理连接,反而加重超时。 - VS Code 自身也有独立的代理设置(如
http.proxy
配置),若与 Git 的全局代理冲突(如一个用 socks5 代理,一个用 http 代理),会导致网络请求混乱。
解决 Failed to connect to github.com port 443:connection timed out_failed to connect to gitlab. connection timed out-CSDN博客