I\'ve been somewhat \'putting up\' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance w
I tried all the answers here and none of these answers worked! My password would not persist between sessions/restarts of my Mac.
What I found out from reading this OpenRadar and this Twitter discussion was that Apple purposely changed the behaviour for ssh-agent in macOS 10.12 Sierra to no longer automatically load the previous SSH keys. In order to maintain the same behaviour as El Cap I did the following:
ssh-add -K ~/.ssh/id_rsa
ssh-add -A
Create (or edit if it exists) the following ~/.ssh/config
file:
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
And now my password is remembered between restarts of my Mac!