在做了ssh key配置后,依然报这个错的话,可能是 git版本问题。
git在2.33后就不支持ssh-rsa,客户端默认禁用了ssh-rsa。
解决方法
编辑 ~/.ssh 目录下的 config 文件(一般有特殊需求才需要修改此文件),如果没有,就需要创建。
添加内容:
Host *HostKeyAlgorithms +ssh-rsaPubkeyAcceptedKeyTypes +ssh-rsa
参考博客:【Git】解决方案:Permission denied (publickey). fatal: Could not read from remote repository.
参考博客中讲的更多
