title: git pull command failing when run inside a python script using gitpython lib, but succeeds when run directly via shell.
body: <p>I am using <code>gitpython</code> library to execute git commands from a python script. </p>
  
  <p>When I execute git pull, it fails giving the following error:
  <code>Permission denied (publickey,gssapi-keyex,gssapi-with-mic)</code>. </p>
  
  <p>However, git pull runs successfully when I run it directly from shell.
  Added to this, other git commands such as <code>git status</code>, <code>git log</code>, are all working fine. ONLY git pull/push gives the above error.</p>
  
  <p>This is the python script:</p>
  
  <pre><code>import os
  import git
  g = git.cmd.Git(local_repo_path)
  os.chdir(local_repo_path)
  g.checkout('master') // this works fine
  msg = g.pull()
  print msg // gives an error mentioned below
  </code></pre>
  
  <p>Output is: </p>
  
  <pre><code>git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
    cmdline: git pull
    stderr: 'Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.'
  </code></pre>
  
  <p>What could be the possible reason ?</p>