SSH Key - Still asking for password and passphrase

后端 未结 30 1391
孤街浪徒
孤街浪徒 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:16

    Problem seems to be because you're cloning from HTTPS and not SSH. I tried all the other solutions here but was still experiencing problems. This did it for me.

    Using the osxkeychain helper like so:

    1. Find out if you have it installed.

      git credential-osxkeychain

    2. If it's not installed, you'll be prompted to download it as part of Xcode Command Line Tools.

    3. If it is installed, tell Git to use osxkeychain helper using the global credential.helper config:

      git config --global credential.helper osxkeychain

    The next time you clone an HTTPS url, you'll be prompted for the username/password, and to grant access to the OSX keychain. After you do this the first time, it should be saved in your keychain and you won't have to type it in again.

提交回复
热议问题