SSH Key - Still asking for password and passphrase

后端 未结 30 1441
孤街浪徒
孤街浪徒 2020-11-27 08:35

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

30条回答
  •  我在风中等你
    2020-11-27 09:35

    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

提交回复
热议问题