Unable to negotiate with <server>: no matching key exchange method found.
Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.
我编辑了~/.ssh/config
文件并添加了
Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1"
但是我仍然收到相同的错误。
另一个解决方案是使用命令 ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@127.0.0.1 -p 2222
,但我也遇到了端口号为22的连接被拒绝的问题。
我正在使用Windows计算机。
.ssh/config/
文件中,你没有用双引号("
)包围该条目,对吗? - dan~/.ssh/config
后重新启动它(在任务管理器中搜索ssh-agent.exe
)。在将Git for Windows升级到v2.25.1后,这对我起作用了。 - S. Marti