github 报错提示 ERROR: You‘re using an RSA key with SHA-1

github 报错提示 ERROR: You're using an RSA key with SHA-1,RSA不能用,需要升级

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.

解决办法:

# 生成新秘钥,如果报错 unknown key type ed25519,使用这个:ssh-keygen -t ecdsa -b 521 -C "[email protected]",一路回车(第一个回车是生成秘钥的名字,不给就默认,后两个是密码,可以不要)
$ ssh-keygen -t ed25519 -C "[email protected]"

# 启动 ssh 代理,根据环境,使用不同的命令
$ eval "$(ssh-agent -s)"

# 将秘钥添加到代理中,如果还有其他以前秘钥,也要添加进去
$ ssh-add id_ed25519

# 查看秘钥,并复制粘贴到GitHub
$ cat ~/.ssh/id_ed25519.pub

# 测试,最好是拉取一个项目看看,可不可以访问
$ ssh -T [email protected]

log

(pytorch) [yudong@admin1 Temp]$ git pull
ERROR: You are 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 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值