Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fedora 33 git pull or clone no longer working and/or ssh key no longer recognized

Tags:

git

ssh

fedora

I recently set up Fedora 33 and was migrating over my files. I copied over my ssh keys and found that I could no longer pull from bitbucket git repos I was able to pull from on my old laptop. The ssh keys are exactly the same, and the public key is already on the bitbucket account. Additionally the permissions were set to chmod 600. I still can not pull from the repo.

like image 902
ajoseps Avatar asked Nov 11 '20 18:11

ajoseps


People also ask

Why my git clone is not working?

Check your spelling If you try to clone [email protected]:user/repo. git , but the repository is really named User/Repo you will receive this error. To avoid this error, when cloning, always copy and paste the clone URL from the repository's page.

Do Git SSH keys expire?

SSH Key pairs in general do not have an expiration date because they do not have metadata outside of their key strings.

How do I clone a git repository without SSH key?

If you need to clone a private GitHub repository without an SSH key you can use a Personal Access Token. This can be useful in a build/deployment pipeline for example where you are using a programmatic GitHub user to clone into a temporary server or container.


1 Answers

This seems to be a recent issue around Fedora 33. This is the relevant bug report.

The issue is that it seems like Fedora 33 removed support for SHA1, and I guess bitbucket.org uses SHA1 for their git clone via ssh. You can verify if this is the same issue by running ssh -Tv [email protected] and grep the output for debug1: send_pubkey_test: no mutual signature algorithm.

The current workaround, as listed in the bug report, is to explicitly specify ssh-rsa support in your ~/.ssh/config:

Add the following entry to your ~/.ssh/config and make sure it has the permission chmod 700 ~/.ssh/config

Host bitbucket.org
    User git
    PubkeyAcceptedKeyTypes ssh-rsa

Replace bitbucket.org with whatever git host you are using

like image 62
ajoseps Avatar answered Oct 17 '22 08:10

ajoseps