安装CommondLine解决升级MAC OS后git不可用的问

2016-12-15  本文已影响0人  赵三问

(转自:忘了哪里了,做个记录,以便将来又忘记了。感谢原作者!)

安装CommondLine解决升级MAC OS后git不可用的问题。

xcode-select --install

在使用git fetch的时候,遇到了如下错误

Unable to negotiate with 192.168.4.28 port 19428: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

http://blog.csdn.net/shadow066/article/details/51222577

2、修改ssh config文件

sudo gedit /etc/ssh/ssh_config

在host下加入

KexAlgorithms=+diffie-hellman-group1-sha1

3、还有一个办法

在用户目录下的.ssh文件夹新建一个config文件

输入

Host *

KexAlgorithms +diffie-hellman-group1-sha1

好,问题解决了。

上一篇 下一篇

猜你喜欢

热点阅读