Mercurial: Pulling from behind a proxy
I’ve been playing around with Mercurial and the mercurial hosting website bitbucket a bit this year and recently wanted to pull from a repository from behind a proxy server.
With a bit of help from the mercurial mailing list and the documentation this is how I was able to pull the repository for the Hambread project I’ve been doing a bit of work on:
~text
hg --config http_proxy.host=ipOfYourProxyServer:portOfYourProxyServer --config http_proxy.user=user --config http_proxy.passwd=password pull http://bitbucket.org/markhneedham/hambread~
After that command a 'hg update' updates your local repository with all the changes that have just been pulled.
What I found strange was that you needed to define the '-- config' part of the command three times as far as I can tell in order to pass each of the different properties related to the proxy.
I tried just defining it once and just setting the properties individually but that just produced errors.
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.