1

I'm trying to clone a repository using ssh. From the command line it works fine, but when I use Egit in Eclipse it doesn't work. I get the following error message:

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

The error log only shows:

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)

According to this thread it seems to be because I'm using JDK7. Unfortunately, I don't have the option of not doing so. It seems I'm not the only person having this problem - another thread here mentions it.

Git works fine on the command line, so I could just clone the repository and then import the project locally, but it's lame to have to always switch between CL and IDE.

Community
  • 1
  • 1
Daniel Lee
  • 2,030
  • 1
  • 23
  • 29

1 Answers1

0

As mentioned in "Eclipse - no Java (JRE) / (JDK) … no virtual machine", you do have the option to use JDK6 to launch your Eclipse.
That doesn't prevent you to reference a JDK7 in the "Installed JRE" section, for your programs to compile/run.

If you still want to access the Git repo through a JDK7-run Eclipse, then you must add the missing certificate in the JDK7 keystore, as described here (ofr https access) or here (for ssh access).

But for ssh issue, this could be related to bug 360862:

error

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250