How can I perform a `git pull` without re-entering my SSH password?

Is it possible to configure git/ssh so I don't have to enter my passphrase every time I want to perform a git pull? Note that the repo is a private one on github.

Or, alternatively, what would be the best practice to automate code deployment from a private Github repo?

Additional details: EC2 instance running a public AMI based on Fedora.


Solution 1:

Have a look at this link https://help.github.com/articles/working-with-ssh-key-passphrases/

But I don’t want to enter a long passphrase every time I use the key!

Neither do I! Thankfully, there’s a nifty little tool called ssh-agent that can save your passphrase securely so you don’t have to re-enter it. If you’re on OSX Leopard or later your keys can be saved in the system’s keychain to make your life even easier. Most linux installations will automatically start ssh-agent for you when you log in.

Solution 2:

I enabled the password caching as described here:

https://help.github.com/articles/caching-your-github-password-in-git/#platform-linux

To cache the password for a month:

git config --global credential.helper 'cache --timeout=2628000'