mac系统出了新版本 13.0.1 后,androidstudio push, pull 代码一直报错:

如下:

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

经过几翻操作,重新生成id_rsa.pub 也是不行,

最后发现是rsa加密方式的问题,苹果mac升级系统后,默认不支持rsa方式加密git通讯,

所以如果要继续使用这个pub文件加密的方式,则要手动添加cofig配置文件来支持:

如下在 ~/.ssh/ 目录下新增config文件,

然后在 ~/.ssh/config 中新增:

Host *
PubkeyAcceptedKeyTypes +ssh-rsa
HostKeyAlgorithms +ssh-rsa
在这里插入图片描述
在这里插入图片描述

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐