I have set up ssh keys and if I test the connection with "ssh -T hg@bitbucket.org" or "ssh -T git@bitbucket.org" it says the connection is successful and I can use git or hg to connect to BitBucket. I am able to clone the repository but when I attempt to push committed changes I get
"Unauthorized
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists."
This happens for both SourceTree and the command line
Hello @hdittmer,
Welcome to the Community.
Are you using the right SSH key? I can see you have an access key associated with the repository you're trying to push to. Access keys are read-only, so they would cause the behaviour you've observed. What exactly do you get back when you run ssh -T git@bitbucket.org?
When you use access key, response would look like this:
$ ssh -T git@bitbucket.org
authenticated via a deploy key.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
This deploy key has read access to the following repositories:
dpenkin/test-repo
As you can see, the message warns that this key has only read access.
A response for a regular SSH key (associated with your account, not with a repo) looks like this:
$ ssh -T git@bitbucket.org
logged in as dpenkin
You can use git or hg to connect to Bitbucket. Shell access is disabled
Hope this helps.
Cheers,
Daniil
The Master branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.