Provide a password for the "git push" command in GitPython
Question: In Python, using [GitPython](https://github.com/gitpython-
developers/GitPython), I need to `git push` to a HTTPS remote repository on
BitBucket.

After running the `repo.git.push()` command, it will return _-as expected-_ :

> bash: /dev/tty: No such device or address
>
> error: failed to execute prompt script (exit code 1)
>
> fatal: could not read Password for '<https://username@bitbucket.org>':
> Invalid argument'

But Python will give me no change to enter the password like in the console.

**How can I "attach" the password to the`git push` command or how can simulate
a console password entry in Python?**

_It is important to note that unfortunately using SSH is**not** an alternative
(the script should not requiere any further action to user that receives it
and that wants to `git push`). I'm looking to "attach" the password into the
command or to "simulate" a text entry on it._


Answer: **What you are attempting to is skirt past security.**

You need to create a pair of ssh keys.

Then, log-on to your bitbucket account's website and upload your public key.

Store your keys in your `~/.ssh` directory.

When you have your keys setup you will not be prompted for a password anymore.

Here is more information about working with SSH keys:
<https://help.github.com/articles/generating-an-ssh-key/>

