分享個遇到的git push的問題灼狰。昨天我忽然無法git push/fetch. 總是報(bào) public key denied 的錯誤颜矿。重新多次生成key并附加到gerrit,都無效嫉晶。但是在另外一臺電腦上用同樣的方式就可以骑疆。今天嘗試生成 ed25519 算法的key(原來的方式是 ssh-keygen -t rsa), 問題解決。不知道是不是windows電腦上的ssh有什么升級導(dǎo)致的還是什么车遂。參考鏈接:https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
刪除 users/<name>/.ssh封断,然后用如下命令重新生成一套key,放到gerrit上即可舶担。
ssh-keygen -t ed25519 -C "your_email@example.com"
或者
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"