7

There's an option http_proxy which should allow access through proxy, but it's not clear whether this should be in the command line, .hgrc or some global variable.

I tried it in the command line:

hg --config=http_proxy.host=_proxy server_

but I still get a Connection timed out error.

Kevin Panko
  • 7,466
Vineeth
  • 173
  • 1
  • 1
  • 5

3 Answers3

6

It's actually an environment variable, so try

http_proxy=http://proxy_server:4242 hg ...

You should replace 4242 with whatever port your proxy is running on.

Ramhound
  • 44,080
durin42
  • 206
5

I can successfully use the following command:

hg clone <TheURl> <Optional Folder Name> --config http_proxy.host=<proxy URL>

And obviously by replacing any <> instances with the relevant details.

3

You can setup proxy authentication in .hgrc file.

It store in ~/.hgrc. Here is an example.

[http_proxy]
host=hostname:port
user=username
passwd=password

Note: I currently use SourceTree app on Mac OSX.

Kevin Panko
  • 7,466
papawin
  • 31