github报错”You’re using an RSA key with SHA-1, which is no longer allowed…“

今天从github拉取私有项目时,出现报错,内容如下:

ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

SSH密钥支持问题,重新生成依然不可用。

仔细看错误提示,从错误下面给出的官方文档 https://github.blog/2021-09-01-improving-git-protocol-security-github/ 可以看到,github对SSH密钥做了升级,原来的SHA-1等一些已经不支持了。

解决

生成新的Ed25519密钥对:

ssh-keygen -t ed25519 -C "your-email"

命令会生成两个新的密钥对:

id_ed25519
id_ed25519.pub

然后去github => setting => SSH and GPG keys里面,将原来的不支持的对应机器的key删除掉,然后添加新生成的key(id_ed25519.pub)就行了。

github报错”You’re using an RSA key with SHA-1, which is no longer allowed…“

原文链接:https://beltxman.com/3804.html,若无特殊说明本站内容为 行星带 原创,未经同意禁止转载。

发表评论

您的电子邮箱地址不会被公开。

Scroll to top