1. 程式人生 > >在git clone報錯

在git clone報錯

在阿里雲新買了一臺伺服器,用的原正常執行的系統做的映象檔案,但在拉程式碼的時候提示如下報錯:
[[email protected] ]# 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檔案裡即可,