I created keys as instructed in the GitHub tutorial, added them to GitHub, and tried using ssh-agent explicitly — yet git continues to ask me for my passphrase every time I try to do a pull or a push.
What could be the cause?
Once you have started the SSH agent with:
eval $(ssh-agent)
Do either:
To add your private key to it:
ssh-add
This will ask you your passphrase just once, and then you should be allowed to push, provided that you uploaded the public key to Github.
To add and save your key permanently on macOS:
ssh-add -K
This will persist it after you close and re-open it by storing it in user's keychain.
If you see a warning about deprecated
flags, try the new variant:
ssh-add --apple-use-keychain
To add and save your key permanently on Ubuntu (or equivalent):
ssh-add ~/.ssh/id_rsa