我有Eclipse Juno,一台带有Git服务器的Synology Server DS213 +。我试图从我的Git服务器检出项目到我的工作区,当我在Eclipse中使用EGit时出现此错误:
org.eclipse.jgit.api.errors.TransportException: ssh://[route]/volume1/Git/project.git: Algorithm negotiation fail
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:223)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:159)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:99)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$8.run(SourceBranchPage.java:324)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://[route]/volume1/Git/project.git: Algorithm negotiation fail
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:202)
... 4 more
Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
at com.jcraft.jsch.Session.receive_kexinit(Session.java:583)
at com.jcraft.jsch.Session.connect(Session.java:320)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 8 more
[route]是正确的,在其他git软件中运行良好
答案 0 :(得分:2)
我发现这个博客的解决方案是:
http://blog.millard.org/2014/11/repair-synology-dsm51-for-use-as-linux.html
使用WinSCP http://winscp.net/eng/download.php我修改了sshd_config并在Synology控制面板中重启ssh。
答案 1 :(得分:2)
Eclipse中的Egit似乎在它不支持ssh服务器支持的任何chiper时抛出此错误。在我的例子中,SSH服务器设置为只接受少数强大的chipers。我在服务器的ssh日志中注意到类似于以下的错误:
fatal: Unable to negotiate with xx.xx.xx.xx port 12345: no matching cipher found. Their offer: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
客户端出错的原因是因为默认的Java安装不支持任何强大的chipers。由于我们已经在使用webupd8团队ppa来安装我们的Java包,因此解决方案是只安装unlimited-jce-policy
包。
apt install oracle-java8-unlimited-jce-policy
重启Eclipse,你就完全了。
答案 2 :(得分:0)
Eclipse需要 diffie-hellman-group1-sha1
修改/ etc / ssh / sshd_config并将其添加到密码中,例如:
Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
答案 3 :(得分:0)
使用 egit 5.2 版设法处理它 https://archive.eclipse.org/egit/updates-5.2/