Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
923 views
in Technique[技术] by (71.8m points)

github - Git through a Proxy. What is causing the 407 error when cloning?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...