在执行git clone命令报错git
Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1vim
Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
解决:bash
# export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'
这种方法每次新开git窗口,都须要从新输入export GIT_SSH_COMMANDssh
避免的方式就是打开.bashrc文件,在终端输入:$ vim ~/.bashrc ,而后向.bashrc文件写入spa
export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'
完毕code