拉起项目代码报错
git clone ssh://uidxxx@gerrit-xxxxxxxx
Cloning into ‘xxxxx’…
Unable to negotiate with xxx.xx.xxx.ip port xxxxx: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
fatal: Could not read from remote repository.
//无法读取远程仓库
未找到匹配的密钥交换方法,不同的密码交换方法
diffie-hellman-group14-sha1,diffie-hellman-group1-sha1文章来源:https://www.toymoban.com/news/detail-656309.html
解决方法
git config配置文件中添加以下内容
uidxxx-MINGW64 vim ~/.ssh/config
```vim
Host *
PubkeyAcceptedKeyTypes +ssh-rsa
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha
uidxxx-MINGW64 ~/.ssh
$ ls -l
total 10
-rw-r--r-- 1 uidxxx 1049089 117 Aug 15 17:00 config
-rw-r--r-- 1 uidxxx 1049089 2602 Aug 15 16:44 id_rsa
-rw-r--r-- 1 uidxxx 1049089 572 Aug 15 16:44 id_rsa.pub
-rw-r--r-- 1 uidxxx 1049089 1007 Aug 15 21:18 known_hosts
uidxxx-MINGW64 ~/.ssh
$ cat config
Host *
PubkeyAcceptedKeyTypes +ssh-rsa
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
uidxxx-MINGW64 ~/.ssh
git又能愉快的玩耍了
文章来源地址https://www.toymoban.com/news/detail-656309.html
到了这里,关于【git clone error:no matching key exchange method found】的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!