SSH:Windows:Git/Gerrit:未找到匹配的密钥交换方法-他们的报价diffie-hellman-group1-sha1
我在我的Ubuntu PC上安装了Git/Gerrit,下面的程序运行良好。但是,我正试图在我的Windows PC上执行相同的操作,但它无法克隆存储库,并说: “无法与55.115.127.145端口9418协商:未找到匹配的密钥交换方法。他们的报价:diffie-hellman-group1-sha1。” 致命:无法从远程存储库读取。“ 在~/.ssh/config:中添加以下内容也不起作用SSH:Windows:Git/Gerrit:未找到匹配的密钥交换方法-他们的报价diffie-hellman-group1-sha1,windows,git,ssh,gerrit,openssh,Windows,Git,Ssh,Gerrit,Openssh,我在我的Ubuntu PC上安装了Git/Gerrit,下面的程序运行良好。但是,我正试图在我的Windows PC上执行相同的操作,但它无法克隆存储库,并说: “无法与55.115.127.145端口9418协商:未找到匹配的密钥交换方法。他们的报价:diffie-hellman-group1-sha1。” 致命:无法从远程存储库读取。“ 在~/.ssh/config:中添加以下内容也不起作用 Host your_email@lab126.com KexAlgori
Host your_email@lab126.com
KexAlgorithms +diffie-hellman-group1-sha1
IdentityFile ~/.ssh/id_rsa
Host 55.115.127.145
HostName 55.115.127.145
User <myname>
Port 9418
KexAlgorithms +diffie-hellman-group1-sha1
IdentityFile ~/.ssh/id_rsa
3) 设置RSA密钥
ssh-keygen-trsa-C“您的_email@lab126.com
生成公共/私有rsa密钥对。
输入保存密钥的文件(/Users/username/.ssh/id\u rsa):
输入密码短语(无密码短语为空):4) 保存在(/Users/username/.ssh/id_rsa)和(/Users/username/.ssh/id_rsa.pub)文件中的公钥和私钥
5) 设置Gerrit: 登录到
6) 在Gerrit中,选择设置->SSH公钥->添加密钥->复制和粘贴公钥
7) 打开cmd行并克隆存储库
C:\Git>git clone ssh://e-gerrit.lab.net:9418/framework -b test
8) 在~/.ssh/中添加配置文件,如上所述我认为它不喜欢55.115.127.145尝试用Awesome替换55.115.127.145!谢谢Ritesh!!它可以工作!!
C:\Git>git clone ssh://e-gerrit.lab.net:9418/framework -b test