使用Gitbash命令行一切正常:我可以执行checkout,git pull,git push等。但它不适用于egit。
我使用STS 3.6.4.RELEASE和插件egit版本3.7
我在eclipse(STS)中添加了我的id_rsa&gt;一般&gt; <网络连接> SSH2。我在私钥域和SSH2家中添加了正确的id_rsa:.ssh 我还在Eclipse代理规则中添加了绕过规则
但是我在获取,提交或其他命令上仍然有同样的错误:
ssh://“username”@“host”:29418 /“project_folder”:验证失败
stacktrace:
org.eclipse.jgit.api.errors.TransportException: ssh://jjack@aurora.credi-ouest.cnamts.fr:29418 / navigo:Auth失败了 org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)at at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:134) 在 org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:103) 在 org.eclipse.egit.ui.internal.fetch.FetchOperationUI $ 1.runInWorkspace(FetchOperationUI.java:123) 在 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) 在org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)引起的 by:org.eclipse.jgit.errors.TransportException: ssh://jjack@aurora.credi-ouest.cnamts.fr:29418 / navigo:Auth失败了 org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159) 在 org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136) 在 org.eclipse.jgit.transport.TransportGitSsh $ SshFetchConnection。(TransportGitSsh.java:262) 在 org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161) 在 org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) 在 org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) 在org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138) 在org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)... 5更多引起:com.jcraft.jsch.JSchException:Auth失败 com.jcraft.jsch.Session.connect(Session.java:512)at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116) ......还有12个
我的同事在日食中具有相同的配置,但它适用于他。 我已经看过这个答案:auth failed error with egit and github
答案 0 :(得分:1)
我在.ssh / id_rsa中添加了错误的元素。我把公钥放在openssh格式而不是“putty”格式的私钥。 最简单的解决方法是使用“常规&gt;网络连接&gt; SSH2&gt;密钥管理&gt;加载现有密钥”导入egit中的id_rsa.ppk,然后将私钥保存在id_rsa文件中。