ERROR:You‘re using an RSA key with SHA-1, which is no longer allowed

xcode 拉代码报错:ERROR:

You‘re using an RSA key with SHA-1, which is no longer allowed

 

解决办法:

 

# 生成新秘钥,使用这个:ssh-keygen -t ecdsa -b 521 -C "your_email@example.com",一路回车(第一个回车是生成秘钥的名字,不给就默认,后两个是密码,可以不要)

$ ssh-keygen -t ecdsa -b 521 -C "your_email@example.com"

 

# 启动 ssh 代理,根据环境,使用不同的命令

$ eval "$(ssh-agent -s)"

 

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

$ ssh-add id_ecdsa

 

# 查看秘钥,并复制粘贴到GitHub

$ cat ~/.ssh/id_ecdsa.pub

 

github -> setting -> SSH and GPG key -> New SSH key

 
重新拉代码就没问题 

 

posted @ 2022-05-16 14:51  不停奔跑的蜗牛  阅读(255)  评论(0编辑  收藏  举报