美文网首页
安装CommondLine解决升级MAC OS后git不可用的问

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

作者: 赵三问 | 来源:发表于2016-12-15 11:34 被阅读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

好,问题解决了。

相关文章

网友评论

      本文标题:安装CommondLine解决升级MAC OS后git不可用的问

      本文链接:https://www.haomeiwen.com/subject/tfawmttx.html