我正在尝试使用MINGW64在Windows上克隆存储库,但出现此错误。
$ git clone ssh://user@server/myproject && scp -p -P XXXXX user@server:hooks/commit-msg myproject/.git/hooks/
Cloning into 'myproject'...
Unable to negotiate with XXX.XXX.XX.XXX: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.
*已经检查文档http://www.openssh.com/legacy.html和在岗的解决方案http://www.openssh.com/legacy.html并仍然得到错误。
已经将此添加到我的配置文件中主机somehost.example.org KexAlgorithms + diffie-hellman-group1-sha1
有帮助吗?
group1较弱,应禁用;参见https://weakdh.org/sysadmin.html
仅支持group1的服务器确实很糟糕。要求服务器操作员对其进行升级是正确的解决方法。
如果您仍然迫切希望连接到它,则应该能够告诉您的客户端使用ssh选项启用它KexAlgorithms +diffie-hellman-group1-sha1
。可以在ssh配置文件中或在命令行中使用设置-o
。如果要使用命令行选项,则需要告诉git将选项传递给ssh,这在此问题的答案中得到了解释:将ssh选项传递给git clone
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句