no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

1. 使用git克隆项目报错

$ git clone ssh://liuchao@192.168.7.32:29418/platform/Midou
Cloning into 'Midou'...
Unable to negotiate with 192.168.7.32: 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.

2. 原因是:  本地使用的git版本高于服务器的git版本

3. 解决办法

切换到用户目录
cd ~/.ssh/
新建config文件
vi config
添加

Host 192.168.7.32
        KexAlgorithms +diffie-hellman-group1-sha1

Host配置的是git服务器的IP

4. 再clone问题解决

posted @ 2016-05-30 10:48  jerry心  阅读(2287)  评论(0编辑  收藏  举报