美文网首页Git
Git ssh-keygen unknown key type

Git ssh-keygen unknown key type

作者: peipeicn | 来源:发表于2019-12-04 11:20 被阅读0次

1. 生成密钥

git config --global user.name "xxx"    
git config --global user.email "xxx@qq.com"  
ssh-keygen -t rsa -C "xxx@qq.com"  

连续按三次回车,这里设置的密码就为空了,并且创建了key。

2.公钥id_rsa.pub填到github.com

3.检查是否成功

ssh git@github.com

出现提示:

PTY allocation request failed on channel 0
Hi peipei1024! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

今天配置 git公钥的时候出现:

ssh-keygen unknown key type -rsa
解决方法
  1. 删除.ssh文件夹
  2. ssh-keygen -C"xxx@qq.com"

注意:-C后面没有空格

相关文章

网友评论

    本文标题:Git ssh-keygen unknown key type

    本文链接:https://www.haomeiwen.com/subject/qypzwctx.html