Cannot push to Git repository on Bitbucket

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

    If you are using SourceTree (I'm using 2.4.1), I found a simpler way to generate an SSH key and add it to my Bitbucket settings. This solved the problem for me.

    1. In SourceTree, go to Preferences.
    2. Go to the Accounts tab and select your account.
    3. There should be an option to generate and copy an SSH key to clipboard.
    4. Once you have copied that, go to Bitbucket in your browser. Go to [avatar] -> Bitbucket settings.
    5. Go to SSH keys.
    6. Click Add key
    7. Paste in the key you copied.

    I received a confirmation email from Bitbucket that an SSH key had been added to my account.

    For reference, on macOS, using Terminal, you can use the following command to see the keys generated for your device. This is where the key you generated is stored.

    ls -la ~/.ssh
    

    As others have stated, this documentation helped me: Use the SSH protocol with Bitbucket Cloud

提交回复
热议问题