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

前端 未结 15 1330
情书的邮戳
情书的邮戳 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 17:57

    None of these answers helped me, turned out my issue was slightly different. It was ssh that was asking for my password each time, before sending the key. So what I had to do was link my password with this command:

    ssh-add -K ~/.ssh/id_rsa
    

    It'll then prompt you for your password and store it. This could be the solution you're looking for if each time your prompted for a password it says

    Enter passphrase for key '/Users//.ssh/id_rsa':

    More info here

    NOTE: I used this on my mac machine successfully, but as @Rob Kwasowski pointed out below, the upper case K option is unique to mac. If not on mac you will need to use lowercase k (which probably works for mac too but I haven't tested).

提交回复
热议问题