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.
Issue the command git fetch/push/pull. You will not then be prompted for the password.
However, if you want to use other Git functionalities (such as push, pull, clone, etc), you will need to access your server through SSH. You need Master Credentials to run Git commands because Application Credentials do not have permission to generate and access SSH keys (stored in the default location).
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.
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With