"Algorithm negotiation fail" error in Eclipse when trying to connect by SSH to a personal Git Server
Asked Answered
S

4

2

I have Eclipse Juno, a Synology Server DS213+ with a Git Server. I'm trying to checkout a project from my Git Server to my workspace and when I use EGit in Eclipse I have this error:

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] is correct and works fine in other git softwares

Sternmost answered 22/4, 2015 at 12:5 Comment(0)
S
2

I found this blog with the solution:

http://blog.millard.org/2014/11/repair-synology-dsm51-for-use-as-linux.html

Using WinSCP http://winscp.net/eng/download.php I modified sshd_config and restart ssh in the Control Panel of Synology.

Sternmost answered 22/4, 2015 at 15:52 Comment(0)
Y
2

Egit in Eclipse seems to throw this error when it does not support any of the chipers supported the the ssh server. In my case, the SSH server was set to only accept a handful of strong chipers. I noticed errors similar to the following on the server's ssh logs:

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

The reason for the error on the client was because the default Java install did not support any of the strong chipers. Since we were already using the webupd8 team ppa to install our Java packages, the solution was to simply install the unlimited-jce-policy package.

apt install oracle-java8-unlimited-jce-policy

Restart Eclipse and you're all set.

Yonatan answered 17/11, 2017 at 23:50 Comment(0)
N
0

Eclipse require diffie-hellman-group1-sha1

Modify /etc/ssh/sshd_config and add it to Ciphers like:

Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
macs [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
kexalgorithms curve25519-sha256,[email protected],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
Nutting answered 26/12, 2019 at 8:37 Comment(0)
O
0

Managed to handle it with egit version 5.2 https://archive.eclipse.org/egit/updates-5.2/

Outbuilding answered 3/5, 2021 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.