Hi,
I have been following https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-vs-code/ to connect VSCode with Atlassian bitbucket, but still I cannot push to my git repository. I could clone the repo I am interested in, but cannot push back to it. It keeps telling me "Unauthorised, Please make sure you have the correct access rights and repository exists."
Obviously, I need to do something else or in addition to what is described in this article.
The documentation could very well be improved and detailing how to configure git to push back to bitbucket. Also, cloning the repository from the Atlassian extension does nothing at all to setup things up correctly so I can push back.
Very, very frustrating.
br
Nicolas
Hi Nicolas,
When you clone a repository, the remote url is set on your local clone.
Based on the error you see, I assume you are using SSH, is that correct?
If that's the case, the SSH client on your machine may not be sending the SSH key you have set up for Bitbucket Cloud when you push.
If you have only one Bitbucket Cloud account and you use only one SSH key with Bitbucket Cloud from that machine, you can edit the ~/.ssh/config file on your machine (if it doesn't exist, you need to create it first) and add the following configuration:
Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile /Users/myUser/.ssh/id_rsa
where /Users/myUser/.ssh/id_rsa replace with the path and name of your private SSH key, whose public key is uploaded to your Bitbucket account. This will ensure that this key is always offered when you interact via SSH with this repo.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.