title: Connect to BitBucket via proxy
body: <p>Hoi,</p>
  <p>I try to <em>hg pull</em><br />
  from my private repo on Bitbucket.org<br />
  into my local repo on my Windows machine<br />
  from behind the company proxy that requires Windows authentication.</p>
  <ul>
  <li><p>I found the proxy server and port (Internet options of IE)</p>
  </li>
  <li><p>I found the settings <code>Mercurial.ini</code> file in my <code>%USERPROFILE%</code></p>
  </li>
  <li><p>I added this section to it (<a href="http://www.selenic.com/mercurial/hgrc.5.html#auth" rel="nofollow noreferrer">info</a>):</p>
  <p>[http_proxy]<br />
  host = <code>TheProxyServer</code> : <code>TheProxyServerPort</code><br />
  user = <code>MyWindowsLogin</code><br />
  passwd = <code>MyWindowsPassword</code></p>
  </li>
  <li><p>This works:</p>
  </li>
  </ul>
  <blockquote>
  <p>C:\path\to\repo&gt; hg pull<br />
  http authorization required<br />
  realm: Bitbucket.org HTTP<br />
  user:</p>
  </blockquote>
  <p>after I enter the credentials of Bitbucket, I get:</p>
  <blockquote>
  <p>searching for changes<br />
  no changes found</p>
  </blockquote>
  <p><strong>But</strong> writing down the password in <code>Mercurial.ini</code> is obviously a <em>major</em> security issue (besides having to update this file each month because of our password policies).</p>
  <p>Is it somehow possible to let Mercurial ask for the proxy credentials?<br />
  Or store these credentials in a more secure way?</p>
  <p><strong>Edit:</strong></p>
  <p>I tried with the same settings and SSH, but I got this:</p>
  <blockquote>
  <p>C:\path\to\repo&gt; hg clone ssh://hg@bitbucket.org/<em>ME</em>/repo/<br />
  running &quot;&quot;C:\Program Files\TortoiseHg\TortoisePlink.exe&quot; -ssh -2 hg@bitbucket.org &quot;hg -R <em>ME</em>/repo/ serve --stdio&quot;</p>
  <p>abort: no suitable response from remote hg!</p>
  </blockquote>
  <p>And a dialog : <code>&quot;PuTTY Fatal Error - Network error: Connection timed out&quot;</code></p>
  <p><strong>Edit2:</strong></p>
  <p>This question came up because Subversion handles this situation correctly:</p>
  <p>In the Subversion <code>servers</code> file I specify the proxy host and port too, and Subversion automagically sends my windows authentication to it. I don't have to enter nor write down my credentials anywhere when checking out source from the web via the proxy using e.g.</p>
  <blockquote>
  <p>C:\workingdir&gt; svn checkout <a href="http://okarito.googlecode.com/svn/trunk/" rel="nofollow noreferrer">http://okarito.googlecode.com/svn/trunk/</a> okarito-read-only<br />
  ...
  Checked out revision 5.</p>
  </blockquote>
  <p>Thanks in advance!<br />
  Jan</p>