Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
939 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:[email protected]: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 Answer

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://[email protected]/myproject.git
And I browsed to http://www.cloudforge.com

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...