title: Authentication in gitpython
body: <p>I am trying to write a fairly simple function (I thought).</p>
  
  <p>I want a user to specify a path to a checked out git repo on his computer. (A git repo that requires authentication).</p>
  
  <p>I then want to do a git pull on that folder to grab any changes.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>    import git
      repo=git.cmd.Git(GIT_PATH)
      repo.pull()
  </code></pre>
  
  <p>This works perfectly on my Linux machine, it never asks for any credentials (I am guessing because ssh-agent has already unlocked the key and supplies credentials when my script needs it).</p>
  
  <p>On Windows however, I can't get it to to work. I have installed putty and added the key to pageant. I can check out the repo using TortoiseGit for example and it works perfectly fine, but if I execute the code above on the Windows machine, I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 2, in &lt;module&gt;
      repo = git.repo.base.Repo.clone_from(GIT_PATH, "t
  mp")
    File "C:\Python34\lib\site-packages\git\repo\base.py", line 849, in clone_from
  
     return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress,
  **kwargs)
    File "C:\Python34\lib\site-packages\git\repo\base.py", line 800, in _clone
      finalize_process(proc)
    File "C:\Python34\lib\site-packages\git\util.py", line 154, in finalize_proces
  s
      proc.wait()
    File "C:\Python34\lib\site-packages\git\cmd.py", line 309, in wait
      raise GitCommandError(self.args, status, self.proc.stderr.read())
  git.exc.GitCommandError: 'git clone -v ssh://git@git.path/repo tmp' re
  turned with exit code 128
  stderr: 'Cloning into 'tmp'...
  Permission denied, please try again.
  Permission denied, please try again.
  Permission denied (publickey,password).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>Edit: I would like to add that I am not married to GitPython. If anyone knows of another library that would solve my problem, that would work as well.</p>