在執行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