When I do a 'git pull' on a repository I get this:
[user@localhost fw]$ git pull
git@bitbucket.company.com: 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:
I have tried regenerating the key, and I get the same problem.
This is due to a bug in the OS I am using, Fedora 33
https://bugzilla.redhat.com/show_bug.cgi?id=1884920
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.
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,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Regards
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.