Git on Bitbucket: Always asked for password, even after uploading my public SSH key

前端 未结 15 1370
情书的邮戳
情书的邮戳 2020-12-22 17:32

I uploaded my ~/.ssh/id_rsa.pub to Bitbucket\'s SSH keys as explained, but Git still asks me for my password at every operation (such as git pull).

15条回答
  •  南笙
    南笙 (楼主)
    2020-12-22 18:01

    The following assumes command-line access via iTerm / Terminal to bitbucket.

    For MacOS Sierra 10.12.5, my system manifested an equivalent problem - asking for my SSH passphrase on each connection to bitbucket.

    The issue has to do with OpenSSH updates in macOS 10.12.2, which are described here in Technical Note TN2449.

    You very well might want to tailor your solution, but the following will work when added to your ~/.ssh/config file:

    Host *
        UseKeychain yes
    

    For more information on ssh configs, take a look at the man pages for ssh_config:

    % man ssh_config
    

    One other thing: there is a good write-up on superuser here that discusses this problem and various solutions depending on your needs and setup.

提交回复
热议问题