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

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

Unable to push code to my private repo

I set up ssh keys after reading the instructions from the confluence.  I am still getting the following error:

repository access denied. access via a deployment key is read-only.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I am able to push my code properly to Github. Don't really know where I am going wrong.

I am trying to push to my private repo.

 

The command ssh -T git@bitbucket.org gives the following output:

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:

myName/repoName: xxxxxx -- my_email_address

6 answers

Same troubles here. I followed all the steps from the main page after creating the repo. I even created a new ssh key just for bitbucket and added it to the repo's access keys. no dice.

Fixed it!

 

  1. Remove the SSH key from the repo. (Click on repo name > Settings > Access Keys)
  2. Add SSH key to Account settings SSH keys. (Click on your avatar > Bitbucket Settings > SSH Keys)
Like # people like this
Like # people like this

I figured it out after just trying this out of desperation 😂😂😂😂 

Same here, working! Tks

Thanks for this solution. They should remove the possiblity to add keys in a repo.

Like itskingruss likes this
jredmond Atlassian Team Oct 07, 2018

That's there for CI/CD systems to connect. It isn't going away any time soon.

Like imerso likes this

It worked. Thanks!

thanks! works again :)

working, thanks!

Lifesaver Thanks!

Appreciate it man!

very thanks man!!!

Thanks, man!!

Thank you so much!

After searching for 3 days. I'm able to push to GIT now. This helped me. Thanks..:-)

Issue exists still on March 28,2020

Fixed using the mentioned trick of removing key from repo and adding to account setting !

So, we need to add ssh key to personal account, instead of repository.

Unbelievable.


I think this docs is useless now, https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys

My God. Superb. It works like a charm - and yeah documentation needs to be updated for this case... or provide more details of the difference

3 votes
jredmond Atlassian Team Jan 20, 2018

First, remove the key from that repository.

Next, add the key to your own account - there's an option in your Bitbucket settings.

I did what you said, but, I am still getting the same error. :(

The same here

Thanks for your help.

That worked Perfect Thanks!!

I am facing the same problem. Via ssh I cannot push back to the repository. If I try it via https it works. I am accessing the repository in our CI/CD scenario and thus I cannot use https access as it asks for the password each time, when I remember correctly.

I need the deployment access key on the repo itself, otherwise our Jenkins job isn't able to access the repo at all - moving that key to the profile settings doesn't help me.

The message I get is

repository access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Please help.

This worked perfect.

im getting the same issue .. keep getting : 

 

$ git push
repository access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

any ideas anyone

did you solve this?

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,821 views 10 16
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