描述
git push时,出现标题中的报错。
简单来说就是,代理软件关掉了(比如clash),但是git代理的配置是全局的。
# 查询配置。(似乎是用vim查看的,按:q退出)
git config --list# 查询某项
git config --global http.proxy# 取消某项配置
git config --global --unset http.proxy
解决
既然你设置了全局代理,总归是有理由的,因此最好的解决办法是,开启代理。
取消代理(备选)
git config --global --unset http.proxy
git config --global --unset https.proxy