hg clone using mercurial throws "getaddrinfo failed" error (windows 7)
Asked Answered
H

6

12

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.

Halfway answered 14/2, 2012 at 5:36 Comment(0)
H
8

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.

Hajji answered 14/2, 2012 at 5:50 Comment(2)
Thanks jjlin. It was a direct command. I am feeling dumb now :)Halfway
It also gives you this error if you get the URL to clone from wrong, in my case I had mis-spelled the domain name.Mattern
X
6

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).

Xerophilous answered 20/9, 2016 at 12:35 Comment(2)
Who may thought that having username in repo name will fail in case of hg-git... That's definitely a proper solution.Xerxes
It 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.gitPhosphoprotein
H
5

Just remove the http_proxy environment variable. (worked for me, after of 5 hours of headache).

Hazaki answered 22/1, 2014 at 13:17 Comment(0)
C
4

Pls check whether you can access the repository directly first. e.g from web browser

Choice answered 9/7, 2014 at 3:24 Comment(0)
D
0

For me, the solution was to set http_proxy env var.

Detriment answered 18/3, 2015 at 10:43 Comment(0)
T
0

In PyCharm mercurial clone dialog that was resolved by enabling the corporate vpn and setting up automatically detecting the proxy in Win 10. However, the PyCharm throwed some new exception like this:

6:03 PM Clone failed Clone from your url here failed. ** Unknown exception encountered with possibly-broken third-party extension hg4ideapromptextension ** which supports versions unknown of Mercurial. ** Please disable hg4ideapromptextension and try your action again. ** If that fixes the bug please report it to the extension author. ** Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] ** Mercurial Distributed SCM (version 4.7.1) ** Extensions loaded: strip, mq, hg4ideapromptextension Traceback (most recent call last): File "hg", line 41, in

Terryterrye answered 24/3, 2019 at 15:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.