Reputation: 1751
Everything is ok with Gitbash command line : I can execute checkout, git pull, git push ,etc. But it doesn't work with egit.
I use STS 3.6.4.RELEASE and the plugin egit version 3.7
I've added my id_rsa in eclipse(STS) > general > Network connections > SSH2. I've added the right id_rsa in private key field and SSH2 home : .ssh I've also added the bypass rule in Eclipse proxy rules
But I still have the same error on fetch, commit or other commands :
ssh://"username"@"host":29418/"project_folder": Auth fail
stacktrace :
org.eclipse.jgit.api.errors.TransportException: ssh://[email protected]:29418/navigo: Auth fail at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139) at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:134) at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:103) at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.runInWorkspace(FetchOperationUI.java:123) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.jgit.errors.TransportException: ssh://[email protected]:29418/navigo: Auth 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.(TransportGitSsh.java:262) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130) ... 5 more Caused by: com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:512) at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116) ... 12 more
My coworker has the same configuration in eclipse but it works for him. I've already looked at this SO answer : auth failed error with egit and github
Upvotes: 1
Views: 8084
Reputation: 1751
I've put the wrong element in .ssh/id_rsa. I had put the public key in openssh format instead of the private key in "putty" format. The easiest way to fix it was to import the id_rsa.ppk in egit using "general > Network connections > SSH2 >key management > load existing key" then save private key in id_rsa file.
Upvotes: 1