If I run git push origin master
, it asks for my Github username and password. How would I put these in with call() like this call(['git', 'push', 'origin', 'master'])
? When I look at the git-push man page, it says nothing about these being arguments.
Asked
Active
Viewed 116 times
1

ZuluDeltaNiner
- 725
- 2
- 11
- 27
-
They aren't. You're likely going to have to use `Popen` and the `PIPE` inputs to stdin/stdout, but I'm not sure if the exact method so I'll leave it to someone else to answer. – aruisdante Mar 10 '14 at 01:29
-
you could [use ssh keys to avoid entering the password every time](https://help.github.com/articles/generating-ssh-keys). – jfs Mar 10 '14 at 01:44
-
@aruisdante: It is likely that the password is read from the terminal directly i.e., `PIPE` won't work. See [Why not just use a pipe (popen())?](http://pexpect.readthedocs.org/en/latest/FAQ.html#whynotpipe) – jfs Mar 10 '14 at 01:46
-
possible duplicate of [Git push : username , password, how to avoid](http://stackoverflow.com/questions/8588768/git-push-username-password-how-to-avoid) – aruisdante Mar 10 '14 at 01:49
1 Answers
0
I switched the protocol of my repo to ssh from https. This removes the need to enter a password

ZuluDeltaNiner
- 725
- 2
- 11
- 27