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