Git 代理失败需要帮助
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23452238/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git proxy failure need asistance
提问by user3565757
I have this error I cannot connect to the proxy I spend 4-5 hours fiddling with the web looking for clues but I cannot resolve this issue..
我有这个错误 我无法连接到代理 我花了 4-5 个小时在网上摆弄寻找线索,但我无法解决这个问题..
I am using windows azure and I am having only proxy problem.
我正在使用 windows azure 并且我只有代理问题。
My commands are as follows:
我的命令如下:
1.Connecting with proxy
1.连接代理
git config --global http.proxy http://<username>:<password>@mapevent.azurewebsites.net:443
2.Clone Error
2.克隆错误
git clone https://<username>@mapevent.scm.azurewebsites.net:443/mapevent.git
Cloning into 'mapevent' ...
fatal: unable to access 'https://<username>@mapevent.scm.azurewebsites.net:443/mapevent.git/': Recv failure: Connection was reset
I have also tried with port 8080 but says "cannot resolve" and use push but all seem to fail.
我也尝试过端口 8080,但说“无法解析”并使用推送,但似乎都失败了。
I am new to Git and I am not progressing :(
我是 Git 的新手,我没有进步:(
Please help me, I have a project to complete in the next few weeks.
请帮助我,我有一个项目要在接下来的几周内完成。
回答by VonC
It seems that http://mapevent.azurewebsites.net/doesn't need a proxy. It is part of the remote origin url which you want to clone, but the page "How to Deploy an Azure Web Site" doesn't mention "proxy" at all. Not does the page using Git.
似乎http://mapevent.azurewebsites.net/不需要代理。它是您要克隆的远程源 url 的一部分,但“如何部署 Azure 网站”页面根本没有提到“代理”。不是使用 Git的页面。
So make sure to remove the proxy, and try to clone:
所以一定要删除代理,并尝试克隆:
git config --global --unset-all http.proxy
If you were to need a proxy to access to internet, you should already have HTTP_PROXY
(and HTTPS_PROXY
) environment variables in place (as I mention in "could not resolve host github.com
error while cloning remote repository in git").
如果您需要代理来访问互联网,您应该已经拥有HTTP_PROXY
(和HTTPS_PROXY
)环境变量(正如我在“在 git 中克隆远程存储库时无法解决主机github.com
错误”中提到的那样)。
But that proxy url (should you actually use one) would certainly notbe '<username>:<password>@mapevent.azurewebsites.net:443
': that is part of the url you want to clone.
但是那个代理 url(如果你真的使用一个)肯定不会是 ' <username>:<password>@mapevent.azurewebsites.net:443
':那是你想要克隆的 url 的一部分。