在git clone报错

在阿里云新买了一台服务器,用的原正常运行的系统做的镜像文件,但在拉代码的时候提示如下报错:
[root@ap001 ]# git clone [email protected]:java/psd.git
Cloning into 'psd'...
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

处理方案:
想起自己在gitlab服务器有设置了IP访问。开启了/etc/hosts.all。把新IP添加到hosts文件里即可,

猜你喜欢

转载自blog.51cto.com/cainiaibage/2336570