title: hg pull from bitbucket using fabric
body: <p>I'm trying to use fabric to deploy a Django project and I get this error when I run <code>hg pull</code>:</p>
  
  <pre><code>[myusername.webfactional.com] run: hg pull
  [myusername.webfactional.com] out: remote: Warning: Permanently added the RSA host key for IP address '207.223.240.181' to the list of known hosts.
  [myusername.webfactional.com] out: remote: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
  [myusername.webfactional.com] err: abort: no suitable response from remote hg!
  
  Fatal error: run() encountered an error (return code 255) while executing 'hg pull'
  </code></pre>
  
  <p>I can run other mercurial commands like <code>hg status</code>, and <code>hg log</code> just fine from my fab file.</p>
  
  <p>I have generated an SSH key on the server and added it to my bitbucket account. This works as I can SSH in and run <code>hg pull</code> and it works fine, it's only when using fabric.</p>
  
  <p>This is my fabfile:</p>
  
  <pre><code>from __future__ import with_statement
  from fabric.api import *
  
  env.hosts = ['myusername.webfactional.com']
  env.user = "myusername"
  
  def development():
  
      # Update files
      local("hg push")
      with cd("~/webapps/mysite/mysite"):
          run("hg pull")
  
      # Update database
      with cd("~/webapps/mysite/mysite"):
          run("python2.6 manage.py syncdb")
          run("python2.6 manage.py migrate")
  
      # Reload apache
      run("~/webapps/mysite/apache2/bin/restart")
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Got this working using https</p>
  
  <p>so instead of </p>
  
  <pre><code>hg pull
  </code></pre>
  
  <p>I'm using </p>
  
  <pre><code>hg pull https://myusername@bitbucket.org/myusername/mysite
  </code></pre>