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

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

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

Host *
    KexAlgorithms +diffie-hellman-group1-sha1

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

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

Host *
    KexAlgorithms +diffie-hellman-group1-sha1

 特别注意:blog

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

相关文章
相关标签/搜索