I'm working on a small ruby script that will checkout and sync a branch on two different servers. I'm trying to figure out how to pass a password to git when pulling. Right now I have
Net::SSH.start(host, user, password: password) do |ssh|
# other code....
result = ssh.exec!("git pull")
# results in Enter passphrase for key '/root/.ssh/id_rsa'
end
After running the git command it get a prompt for the key passphrase.
Is it possible to pass that in with a git command? Or is there another way to do that within ruby?