I currently have the following code:
def run_commands(commands):
commands = commands.split()
process = subprocess.run(commands)
process.stdin.write("password")
output = run_commands("git clone ssh://git@git.com/opt/git/repository.git")
This code works up to process.stdin.write("password")
. It's executing the command but then waiting on a password input, however using this write method doesnt write anything into the command window. The solution im looking for is to be able to run a command then type to the same command window so I can enter the password.