git clone时出现了ssh_exchange_identification: read: Connection reset by peer fatal
今天在Centos7虚拟机上从git库拉取代码时出现了一下错误:
ssh_exchange_identification: read: Connection reset by peer fatal:
Could not read from remote repository.
git -v 加上要连接的ip地址。看到有个错误是
key_load_public:No such file or directory
解决方案是
ssh-agent bash #开启ssh-server服务
ssh-add ~/.ssh/id_pub.rsa #把本地密钥添加进去
再次测试,问题解决