Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unauthorized response from remote repository

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

3 answers

0 votes

@hdittmer 

It could be because of the branch level permissions. Can you check which branch you have access to write in the settings of the repository?

The Master branch.

0 votes

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

464 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you