Git ssh-keygen unknown key type -rsa

1. 生成密钥

git config --global user.name "xxx"    
git config --global user.email "[email protected]"  
ssh-keygen -t rsa -C "[email protected]"  

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

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

3.检查是否成功

ssh [email protected]

出现提示:

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"[email protected]"

注意:-C后面没有空格

你可能感兴趣的:(Git ssh-keygen unknown key type -rsa)