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

3 answers

1 vote

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. :(

1 vote

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)


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

did you solve this?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

171 views 20 8
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you