title: How do I set the git username and password when using gitpython?
body: <p>I am planning on utilizing GitPython for my project. When I test it out, using this code I am receiving an error.</p>
  
  <pre><code>repo.index.add(['*']) 
  repo.index.commit(message="Initial Commit")
  repo.remotes.origin.push()
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 24, in &lt;module&gt;
      repo.remotes.origin.push()
    File "C:\Python27\lib\site-packages\git\remote.py", line 627, in push
      return self._get_push_info(proc, progress or RemoteProgress())
    File "C:\Python27\lib\site-packages\git\remote.py", line 564, in _get_push_info
      finalize_process(proc)
    File "C:\Python27\lib\site-packages\git\remote.py", line 64, in finalize_process
      proc.wait()
    File "C:\Python27\lib\site-packages\git\cmd.py", line 100, in wait
      raise GitCommandError(self.args, status, self.proc.stderr.read())
  git.exc.GitCommandError: 'git push --porcelain origin' returned exit status 128:
  </code></pre>
  
  <p>There is no message after that last line. However, if I manually run <code>git push --porcelain origin</code> from the command line, I receive the error:</p>
  
  <pre><code>fatal: could not read Username for 'https://github.com': No such file or directory
  </code></pre>
  
  <p>This is a fair error. It's a brand new repository and I haven't fully configured yet. However, I plan on deploying this project (and the ability to push) across multiple machines so I'd prefer to be able to do automatically via GitPython.</p>
  
  <p>How can I set the username and password (or utilize an SSH key) to push to the remote repository? </p>