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

ssh key not accepted by Bitbucket


When I do a 'git pull' on a repository I get this:

[user@localhost fw]$ git pull Permission denied (publickey).
fatal: Could not read from remote repository.

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

If I try and add my public key to Bitbucket I get this:

Screenshot_20201125_141246.pngI have tried regenerating the key, and I get the same problem.



2 answers

1 accepted

0 votes
Answer accepted

This is due to a bug in the OS I am using, Fedora 33

The workaround is to update ~/.ssh/config with the following:

Host <insert hostname of your bitbucket server>
 PubkeyAcceptedKeyTypes +ssh-rsa


Thanks for your help Ana.

0 votes
Ana Retamal Atlassian Team Nov 30, 2020

Hi @John Lawlor, thanks for reaching out!

The error you're getting is not necessarily related to your SSH key. Are you pulling from a repository you own, or is it someone else's repository? If it's someone else's repository, please make sure you the right permissions, otherwise you won't be able to pull.

Regarding the keys, I've checked the Bitbucket Cloud account associated with this Community account and I could see that you have several SSH keys associated with it. When you try to add a new one, please make sure you're copying the contents of the new key you just created, and are not copying an existing key by accident. If you're adding a new key, you shouldn't be facing any issues 🙂

Another thing that would help you narrow down the problem is trying to pull a different repository and checking if you have any inconvenience. 

If you have the right permissions, and you're certain you're adding a new key and you're still having trouble, let us know so we can continue assisting you on this. 


Best regards,


Hi Ana,

Thanks for getting back to me. This is not Bibucket Cloud, it's Bitbucket Server. The repository is one that I have pulled from lots of times before. In fact, I can't pull from any repository that I have used before. They all complain about the public key.

I am using git client version 2.28.0 and Bitbucket Server 7.5.0




Suggest an answer

Log in or Sign up to answer
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,740 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