Cannot push to Git repository on Bitbucket

后端 未结 21 712
春和景丽
春和景丽 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:20

    I got this very same error for one repository - suddenly, all other ones were and still work fine when I'm trying to push commits. The problem appeared to be with the SSH key (as you already know from the previous comments) - on bitbucket go to View Profile then click Manage Account.

    On the left hand side click on the SSH Keys then add the one that you have on your system under ~/.ssh/ directory.

    If you don't have one generated yet - use the instructions from one of the posts, but make sure that you either use the default id_dsa.pub file or custom named one, with later requiring the -i option with the path to the key when you connect i.e.

    ssh -i ~/.ssh/customkeyname username@ip_address
    

    Once you've added your local key to your account at bitbucket, you'll be able to start interacting with your repository.

提交回复
热议问题