Git推送提示:kex_exchange_identification: Connection closed by remote host Connection closed by 20.205.243.166 port 22
Git推送提示:kex_exchange_identification: Connection closed by remote host Connection closed by 20.205.243.166 port 22
原因:公钥有问题,需要删除.ssh下文件,然后重设置用户名和邮箱再重新生成ssh公钥即可解决
解决方案:
1、删除.ssh下所有所有文件
2、设置用户名、邮箱
git config --global user.name ‘用户名’ git config --global user.email ‘邮箱’
3、查看配置是否设置成功
git config --list
4、修改后面剩余的邮箱配置,输入完成后一直回车就行了
ssh-keygen -t rsa -C "邮箱"
5、在Github中配置SSH信息,打开id_rsa.pub文件复制到SSH-key中添加新的key就可以了
6、重新提交推送就行啦