通过代理Git。克隆时导致407错误的原因是什么? [英] Git through a Proxy. What is causing the 407 error when cloning?

查看:2268
本文介绍了通过代理Git。克隆时导致407错误的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过代理使用Git。我尝试过很多方式设置参数'git config --global',但克隆存储库时总是没有成功。



我做过:

  git config --global http.proxy http:// DOMAIN \\\username:password@10.0.2.42:8080 
git config --global http.sslverify false
git clone http://github.com/project/project.git

我得到了:

$ $ p $ git clone http://github.com/project/project。 git文件夹
克隆到'文件夹'...
错误:请求的URL返回错误:407访问http://github.com/project/project.git/info/refs
时致命的:HTTP请求失败

那么,我该如何调试这个或在Git中启用日志来发现为什么我还是会得到407错误?在Git中有一些参数能够详细地显示发生了什么,以便捕获发生错误的正确点吗?

解决方案

在Windows中从Git Bash客户端尝试 git push 的类似问题。


我只是通过浏览到站点使用Chrome。

然后,我回到了Git Bash,它立即工作



为了清楚起见,我的GIT存储库URL看起来像 http://me@me.git.cloudforge.com/myproject.git

我浏览了 http:// www.cloudforge.com




我的理解是,它强制代理解析此域名。


I'm trying to use Git through a proxy. I've tried setting parameters 'git config --global' in a lot of ways but always without success when cloning repositories.

I did:

git config --global http.proxy http://DOMAIN\\\username:password@10.0.2.42:8080
git config --global http.sslverify false
git clone http://github.com/project/project.git

And I got:

$ git clone http://github.com/project/project.git folder
Cloning into 'folder'...
error: The requested URL returned error: 407 while accessing http://github.com/project/project.git/info/refs
fatal: HTTP request failed

So, how can I debug this or enable logging in Git to discover why I'm still getting the 407 error? Is there some parameter in Git to verbosely show what is happening to catch the right point where the error is occurring?

解决方案

I had a similar problem trying to git push from a Git Bash client in Windows.

I fixed it just by browsing to the site using Chrome.
Then I came back to Git Bash and it worked right away

For clarity, my GIT repository URL looks like http://me@me.git.cloudforge.com/myproject.git
And I browsed to http://www.cloudforge.com

My understanding is that it forces the proxy to resolve this domain.

这篇关于通过代理Git。克隆时导致407错误的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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