前言:Linux系统,使用vscode进行远程连接。
git push -u origin main
的时候,出现了如下问题:
无法连接到127.0.0.1 port 7890,连接被拒绝了。百度大法后基本上是取消代理即可:
git config --global --unset http.proxy
git config --global --unset https.proxy
但是我在终端中输入命令运行后,会出现一个红叉:
命令无法运行。
可能是之前设置过代理的名字不是http.proxy,通过git config --global -l
命令查看git当前设置:
红框里的命令就是代理的名字。重新输入命令:
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
再次git push -u origin main
,问题解决了!!!哦耶!