git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

在执行git clone命令报错

Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

Unable to negotiate with xxx.xxx.xxx.xxx port : no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

解决:

# export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'

这种方法每次新开git窗口,都需要重新输入export GIT_SSH_COMMAND

避免的方式就是打开.bashrc文件,在终端输入:$ vim ~/.bashrc  ,然后向.bashrc文件写入

export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'

完毕

上一篇:linux 下解决git clone报错


下一篇:How to:如何在调用外部文件时调试文件路径(常见于使用LaunchAppAndWait和LaunchApp函数)