I want to write a program that will clone a remote git repository and then do a bunch of other things. The problem is that 'git clone' asks for a password. This does not work when I open the channels for stdin / out / err to 'git clone', because it starts git -remote-http, under which the password for TTY is requested.
I would like to pass the password from my program. I am using Python and Popen from a subprocess. The code below is not wotk.
Popen(['git', 'clone', 'https://my.git.repo/repo.git'], shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE)
How can i achieve this?
source share