git push -u origin master错误:收到HTTP代码0 [英] git push -u origin master error: Received HTTP code 0

查看:61
本文介绍了git push -u origin master错误:收到HTTP代码0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我多次使用此命令,并且每次都有效,但是今天在创建存储库并再次使用它之后,发生了错误:

I used this command several times and it worked every time but today after I created a repo and use it again an error occurred:

git push -u origin master

它给了我这个:

error: Received HTTP code 0 from proxy after CONNECT while accessing https://github.com/[myrepo]

fatal: HTTP request failed

我使用 echo $ http_proxy 并获得了 http://127.0.0.1:48100 .有时是一个用于我的Firefox.)而且我使用了 unset 命令,但它仍然给我同样的错误.有没有一种方法可以将我的代理服务器永久设置为无?

I used echo $http_proxy and got http://127.0.0.1:48100 .But I don't remember I ever set this.(I do use this one for my firefox sometimes.) And I used the unset command but it still gave me the same error. Is there a way I can set this proxy thing to none permanently?

还有其他方法可以实现这一目标吗?

Is there some other ways to achieve this?

感谢您的帮助!

推荐答案

如果您考虑:

似乎您当前的 http_proxy / https_proxy 环境变量(或您的 git config --global http(s).proxy )没有不再引用有效的代理.
还要检查用于这些代理的语法(每个代理都应以 http://... 开头,如 http://host:port 中一样).

it seems your current http_proxy/https_proxy environment variables (or your git config --global http(s).proxy) don't reference a valid proxy anymore.
Check also the syntax used for those proxys (each one should begin with http://... as in http://host:port).

这篇关于git push -u origin master错误:收到HTTP代码0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆