hg clone using mercurial throws "getaddrinfo failed" error (windows 7)
Solution 1
Sounds like you might need to tell Mercurial what your proxy settings are. First hit for "mercurial proxy":
http://www.markhneedham.com/blog/2009/05/13/mercurial-pulling-from-behind-a-proxy/
If you need to figure out what settings to use, you should probably look at what your IE settings are, e.g. by going to the Internet Properties | Connections | LAN Settings
dialog.
Solution 2
If you find yourself on this page because you've hit a getaddr
error when using the hg-git
plugin with a username, it is likely that you've hit the Fails with username in URL (getaddreinfo failed) bug.
Thus:
$ hg clone https://foo@stash/
abort: error: getaddrinfo failed
$ hg clone https://stash/
http authorization required for http://stash.....
realm: Atlassian Stash
user: ...
(Doesn't solve the original user's issue, but can be a cause of the same symptoms).
Solution 3
Just remove the http_proxy
environment variable. (worked for me, after of 5 hours of headache).
Solution 4
Pls check whether you can access the repository directly first. e.g from web browser
Sandeep G B
Software Engineer - Seattle, WA Interests: OOAD, Design patterns, Web development Languages: C# / Javascript / SQL / PERL
Updated on June 03, 2022Comments
-
Sandeep G B about 2 years
I have created a public repository on bit bucket website. I can run the clone command from outside the office network (LAN).
But it is not working inside the office network. I am suspecting it is to do with firewall or proxy settings. I can access the URL from browser window (IE9/Chrome).
Please help in fixing this problem. Thanks.
Command:
hg clone https://bitbucket.org/gbsandeep/test2 abort: error: getaddrinfo failed
PS: I went through other posts but it did not help.
-
Sandeep G B over 12 yearsThanks jjlin. It was a direct command. I am feeling dumb now :)
-
Jason D about 10 yearsIt also gives you this error if you get the URL to clone from wrong, in my case I had mis-spelled the domain name.
-
gnysek over 7 yearsWho may thought that having username in repo name will fail in case of
hg-git
... That's definitely a proper solution. -
Sushil Kumar over 4 yearsIt worked when I removed the username from URL ssh://[email protected]/username/reponame.git Removing the first username helped fix the error ssh://bitbucket.org/username/reponame.git