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

Unable to push code to my private repo

Pritam Bohra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2018

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

7 answers

17 votes
jlynch80
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 4, 2018

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.

jlynch80
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 4, 2018

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
Mario Rodriguez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 8, 2018

unbelievable

Like # people like this
Walid Doch June 9, 2018

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

Ygor Nascimento
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2018

Same here, working! Tks

juanpa1509
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 21, 2018

Thanks it works for me.

Anja Schulz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 7, 2018

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

Like itskingruss likes this
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2018

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

Amir Tamadon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2018

@jlynch80

DUDE.... I LOVE YOU 

Like imerso likes this
theChristian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2018

It worked. Thanks!

Stefan Bozkurt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 2, 2018

thanks! works again :)

Nilesh Patidar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 18, 2018

Thanks Mate :)

Alexandrina Onea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2019

Thanks a lot!!

codedweb
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2019

working, thanks!

rbcani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2019

Lifesaver Thanks!

ijankovic
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2019

Appreciate it man!

jonathslak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 22, 2019

very thanks man!!!

pauloabelha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2019

Thanks, man!!

fahimiqbal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2019

Thanks a lot

EhsanCode
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 9, 2019

Thank you so much!

Marc Charbonneau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 11, 2019

thank you!

joabeleao
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2020

Thanks!!!

i_hasbi.mahesh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 5, 2020

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

Ravinder_Mahori
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2020

Issue exists still on March 28,2020

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

tecnoluisao
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 5, 2020

Tks :)

Hanout Ali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2020

thanks

Fendi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 16, 2020

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

Durvesh P Gamerji
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2021

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

scott
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2022

I got here after solving the issue myself. I was about to revert to https and needed to add password for that then i saw option to add ssh. I hadn't realised I was adding a depolyment ssh for read only.

Atlassian can you make this clearer?

The current (which I and many others failed to read and isn't particularly clear anyway):

"Use access keys to gain read-only access to this repository. Learn more about using SSH keys."

could be replace with 

"Use access keys to gain READ-ONLY access to this repository FOR READ WRITE add in your personal settings. Learn more about using SSH keys."

 

Or better still a popup that warns you when you add a key. 

 

Backtracking I see it was those instructions above that sent me on this route, again these could be much clearer. 

 

I see clickup have github integration. if it were up to... 

3 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 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.

Pritam Bohra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 21, 2018

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

Walid Doch May 28, 2018

The same here

Ygor Nascimento
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2018

Working! Tks!

Jesus Montoya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2019

Thanks for your help.

0 votes
robtoddler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2023

Thanks for this answer! It saved me. It's a bit confusing how this account-wide setting is hidden away, but it seems pretty easy to add/remove SSH keys for a repository... even though it doesn't really do much.

IMPORTANT: I found it quite hard to find my account settings, the interface may have changed since the original comment.
INSTRUCTIONS: Click on the settings 'cog wheel' next to your 'avatar' (my initials in my case) and choose Personal Bitbucket Settings. It's there you will find Security -> SSH keys.

0 votes
KevinBrent
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 27, 2019

That worked Perfect Thanks!!

0 votes
appdinx
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2018

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.

KevinBrent
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 27, 2019

This worked perfect.

0 votes
Daniel Griffiths
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 8, 2018

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

0 votes
Walid Doch May 28, 2018

did you solve this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events