After the Gitee ssh public key is configured, the troubleshooting process and solution for still permission denied
Today, I git pull an old project, which has been submitted well before. This time, I suddenly reported an error
firstname.lastname@example.org: Permission denied (publickey).. It is obviously my own repo, but it told me that I don’t have permission? ?
At first, I thought that the local id_rsa.pub change caused the original record on gitee to be invalid, so the [ssh] -keygen command was regenerated and posted on gitee, which is still the same.
Then I suspected that I messed up the configuration of git when I was tossing around, and
pacman -S gitforced the reinstall again, which was still the same.
I also tried to clone other repo on gitee by ssh and it was also permission denied, but it was fine to use http. But is it the pot of files in the ~/.ssh directory? So I moved my position and tried it on github. I can clone normally on github without any obstruction.
Strange, is it a bug of gitee? So, I opened two terminals, an ubuntu development machine on the left and my local on the right. Both pairs regenerated ssh-key, re-posted it on gitee, and cloned again, all in one go.
However, the development machine is unblocked, and there is no local permission…
Later, I saw that someone [could not access the code cloud network after the ssh public key is configured] . Although the author has not solved it, the following answer provides an idea:
ssh -Tvvv email@example.com can print a detailed log!
I execute it remotely and locally
ssh -Tvvv firstname.lastname@example.org, although as before, one side is successfully authenticated and the other side is Permission Denied, but the difference is that this time there is a more detailed log!
Not afraid of errors, but of unexplained errors. This is easy to handle. The comparison of the logs on both sides is dizzying. Finally, I found some clues on the right side:
debug1: send_pubkey_test: no mutual signature algorithm
Um? why? Without this signature algorithm? ?
Clear the clouds and see the sun
Now that send_pubkey_test: no mutual signature algorithm has been found, of course, ask google. According to what is said in SSH-RSA key rejected with message “no mutual signature algorithm” :
meaning, [RSA] SHA-1 algorithm is obsolete. If you must, you can enable it in ssh config:
# Edit ssh configuration file sudo vim /etc/ssh/ssh_config # Add the following PubkeyAcceptedKeyTypes +ssh-rsa
Willows and Flowers
I guess the original RSA SHA-1 algorithm was deprecated during a system update.
According to the above, after modifying the ssh config, save it, re-git clone it, and you can use it normally.