问题
windows10使用ssh-keygen -t rsa
重新生成密钥并配置到github 设置后,一直无法连接github,无法push,ssh -T git@github.com
提示kex_exchange_identification: Connection closed by remote host
解决
- 在申请ssh秘钥之前,首先要重置全局git用户名和邮箱地址。
1 | git config --global user.name "xxx" |
- 使用下面的命令生成秘钥,注意这里一定要加上上面注册的那个邮箱地址
1 | ssh-keygen -t rsa -C "xxx@qq.com" |
- 将_rsa.pub文件中的密码复制粘贴到git或者码云中
- 成功
参考
https://blog.csdn.net/weixin_33708432/article/details/88599547