git clone时出现:"diffie-hellman-group1-sha1 "

解决办法1:在用户配置目录下添加一个ssh配置文件

vim /root/.ssh/config  内容如下:

Host *
    KexAlgorithms +diffie-hellman-group1-sha1

解决方法2: 在ssh全局配置目录下添加一个ssh配置文件

vim /etc/ssh/ssh_config.d/ssh_xx.conf  内容如下:

Host *
    KexAlgorithms +diffie-hellman-group1-sha1

 特别注意:

~/.ssh/config文件的权限,不能设置为777, 否则仍会报上述错误,设置为660是OK的。

 

转载于:https://www.cnblogs.com/noxy/p/8550281.html

你可能感兴趣的:(git clone时出现:"diffie-hellman-group1-sha1 ")