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问题解决

相关文章:

  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-07-19
  • 2021-06-05
  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-06-05
  • 2022-01-02
  • 2021-11-08
  • 2022-12-23
相关资源
相似解决方案