Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Repository access denied, key is read-only

Kristi Belcher
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 29, 2018

I have a new repository. I set up an ssh-key following the instructions at https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html. I got access to my repository and thought things were fine. I could create new files and add them with "git add". I could commit changes with a message like "git commit -m 'message'". However, when I try to push to my own repository, I get:

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 go to my repository settings and everything looks fine. It's a public repository from what I can tell from settings. Internet connection is fine. I've googled this and haven't found anything that works. I've never had this problem before, so any suggestions would be much appreciated.

1 answer

0 votes
Rajath Veeramanchala September 30, 2018

Hi @Kristi Belcher ,

Are you sure that you pasted the correct public key into your bitbucket account. You can generate a key using below command in your git bash :

ssh-keygen -t rsa

This would create an id_rsa.pub under .ssh folder in your user folder. Copy the public key and paste under SSH keys of your bitbucket account. This way you can authenticate via ssh easily and also make sure you have write permission on the repository and there are no branch restrictions. It may also be possible that you have given the remote url wrong. Check if the remote url is correct using the below command : 

git remote -v

Hope this helps.

Regards,

Rajath.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events