Unable to negotiate with 192.168.XX.XX port XXXX: no matching key exchange method found.


問題

Unable to negotiate with xx.xx.xx.xxx port 29418: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
fatal: 無法讀取遠程倉庫。


解決方法

sudo vim ~/.ssh/config

添加:

1 host xx.xx.xx.xxx
2 port 29418
3 KexAlgorithms +diffie-hellman-group1-sha1
4 KexAlgorithms +diffie-hellman-group14-sha1

原因:

如果是fetch github這些平台的代碼可以直接拉,但是如果是拉取自己搭建的git服務器代碼就需要配置一下 .ssh/config,添加一下端口和相應信息


免責聲明!

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



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