Cannot push to Git repository on Bitbucket

后端 未结 21 693
春和景丽
春和景丽 2020-11-29 14:40

I created a new repository and I\'m running into a strange error. I\'ve used Git before on Bitbucket but I just reformatted and now I can\'t seem to get Git to work. After

21条回答
  •  隐瞒了意图╮
    2020-11-29 15:42

    This might not be the case for everyone but I still make an answer here in case someone is having the same cause. Basically I have two Bitbucket accounts, each have two different public keys. By running ssh -Tv bitbucket.org I managed to see that my laptop is sending incorrect key (but since both public keys are registered in bitbucket, the key is still approved, then since the key is linked to another account which does not have access to the repo I'm pushing, the push is rejected).

    So I followed this guide and my issue is gone: https://blog.developer.atlassian.com/different-ssh-keys-multiple-bitbucket-accounts/

提交回复
热议问题