git---如何解決The authenticity of host can't be established.


新生成密鑰的時候,git clone或者push的時候,可能會報這樣的錯誤:

```

The authenticity of host 'gitee.com (xxx.xxx.xxx.xxx)' can't be established.

ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxx.

```

Google之后明白,文件夾內少了一個known_hosts文件,本來密鑰文件應該是三個,現在只有兩個,便報了這樣的錯誤,此時輸入yes回車之后,生成了缺少了的known_hosts文件,便可解決這個問題:

```

Are you sure you want to continue connecting (yes/no)? //輸入yes,回車

Warning: Permanently added 'gitee.com,xxx.xxx.xxx.xxx' (ECDSA) to the list of known hosts.

ssh_packet_read: Connection closed

```

 



 

 

.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM