How to run git pull and bypass SSH passphrase prompt in user startup script?
This is on Ubuntu, I have a user startup shell script that runs every time the instance boots (EC2 via
--user-data-file argument). I want to have the instance do a git pull from a specific branch every time it boots. The problem is when I do a git pull, there is a SSH key passphrase prompt and I am not sure what the best way is to automatically enter the password in a shell script.
2 Solutions collect form web for “How to run git pull and bypass SSH passphrase prompt in user startup script?”
Try Expect http://en.wikipedia.org/wiki/Expect
it will allow you to provide password to interactive ssh session
You should generate your public ssh key and ask the administrator of that branch to store the key in his authorized_keys file.
This is what you should do:
Generating Your SSH Public Key
This is what the administrator should do:
How to Use RSA Key for SSH Authentication