记录,有时候实验室服务器ip地址更换,就会出现克隆仓库出错。
“
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
”
解决方法:
1.删除.ssh文件下面的
2.重新生成密钥
ssh-keygen -t rsa -b 4096 -C "邮箱"
下面一直回车就行。
3.打开github官网,个人设置页面,点击SSH and GPG keys
然后 点击新建 SSH keys
4.将 id_rsa.pub 里面的密钥粘贴进去,保存即可
最后,就可打开终端进行克隆仓库了。
参考:
解决 “fatal: Could not read from remote repository.“_I'm GHB的博客-CSDN博客