出现错误
使用Git clone代码,已经将本机SSK key上传,但是报错
Unable to negotiate with xx.xx.x.xxx port xxxx: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.
解决问题
由于Git server和client使用的ssh key解析算法不一致,client默认使用新的key exchange method,而server只提供 diffie-hellman-group1-sha1 方法,因此无法正常建立链接
在“C:\Users\Administrator.ssh”文件夹下,新建config.txt文件,在文件中保存
Host *
KexAlgorithms +diffie-hellman-group1-sha1
保存后,删除config文件的后缀名,再次使用Git clone,就可以正常拉取代码了。