Egit(Eclipse)可以查看存储库但不会克隆它

时间:2012-03-16 19:02:09

标签: eclipse git ssh clone egit

我尝试使用ssh克隆存储库。从命令行它可以正常工作,但是当我在Eclipse中使用Egit它不起作用。我收到以下错误消息:

Git repository clone failed.
ssh://user@host: Password: 

错误日志仅显示:

org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://lee@137.248.191.189:22: Password: 
    at org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider.get(UsernamePasswordCredentialsProvider.java:110)
    at org.eclipse.jgit.transport.CredentialsProvider.get(CredentialsProvider.java:135)
    at org.eclipse.jgit.transport.CredentialsProviderUserInfo.promptKeyboardInteractive(CredentialsProviderUserInfo.java:142)
    at com.jcraft.jsch.UserAuthKeyboardInteractive.start(UserAuthKeyboardInteractive.java:135)
    at com.jcraft.jsch.Session.connect(Session.java:425)
    at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
    at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
    at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
    at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:129)
    at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:175)
    at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
    at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153)
    at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.executeCloneOperation(AbstractGitCloneWizard.java:430)
    at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.access$2(AbstractGitCloneWizard.java:424)
    at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard$5.run(AbstractGitCloneWizard.java:386)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

根据this thread,似乎是因为我使用的是JDK7。不幸的是,我没有选择不这样做。我似乎并不是唯一有这个问题的人 - 另一个线程here提及它。

Git在命令行上运行正常,所以我可以克隆存储库然后在本地导入项目,但是它必须始终在CL和IDE之间切换。

1 个答案:

答案 0 :(得分:0)

如“Eclipse - no Java (JRE) / (JDK) … no virtual machine”中所述,您可以选择使用JDK6启动Eclipse。
这并不妨碍您在“已安装的JRE”部分中引用JDK7,以便您的程序可以编译/运行。

如果您仍想通过运行JDK7的Eclipse访问Git仓库,则必须在JDK7密钥库中添加缺少的证书,如described here (ofr https access)here (for ssh access)

但是对于ssh问题,这可能与bug 360862

有关

error