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 recently upgraded to macOS Mojave, and installed some tools via homebrew, which seemed to swap Apple's version of ssh-add for the different one. My default version of ssh-add did not have the -K option. This led to the following error:
# ssh-add: illegal option -- K
You can see which version of ssh-add you have by running which ssh-add.
(Mine was stored in /usr/local/bin/ssh-add)
To fix this, I had to point the key to Apple's version:
/usr/bin/ssh-add -K ~/.ssh/id_rsa
Git/GitHub worked perfectly afterward. For more information, see: Error: ssh-add: illegal option -- K