Configure Mercurial (hg) to Use a Proxy Server

My laptop is behind our corporate firewall for most of the day, so being able to do an hg push/pull against bitbucket.org fails because it isn’t hitting or proxy server. To setup Mercurial to use a proxy server, edit your hrgc file in the .hg folder of your repository and add this section:

[http_proxy]
host = foo.bar:8000
passwd = password
user = username

Just change the values to your proxy server hostname and port, username and password.

[updated]: fixed passwd, not password

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Reddit
  • DotNetKicks
  • Technorati
  • TwitThis

3 Comments to “Configure Mercurial (hg) to Use a Proxy Server”

  1. Ricardo 5 May 2011 at 11:40 am #

    Thanks! It worked

  2. matg 24 May 2011 at 2:10 am #

    Yes, it’s worked by changing password to passwd!

  3. James 13 June 2011 at 1:29 pm #

    @matg,

    I updated password to passwd. Thanks.


Leave a Reply