Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360862

Summary: Unable to clone repository using EGit 1.1
Product: [Technology] EGit Reporter: Nathan Gervais <nathan>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: apiwoni1, caniszczyk, matthias.sohn, remy.suen, robin.rosenberg, rsbecker
Version: 1.1   
Target Milestone: 2.0   
Hardware: All   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot of error message none

Description Nathan Gervais CLA 2011-10-13 12:18:11 EDT
Created attachment 205143 [details]
Screenshot of error message

Previously in EGit 1.0 I could use this git url 

git+ssh://nathan@foundation.eclipse.org/gitroot/marketplace/org.eclipse.marketplace.git

and I could clone my repository no problem

now when I use the same command in 1.1 I get this message box, (yes I'm entering in the right password)

See attached.

I also realize this could be a server config problem  any suggestions would be helpful.
Comment 1 Remy Suen CLA 2011-10-13 13:23:29 EDT
I presume both attempts were on the same computer. Were they both using the same workspace? Do you save your passwords in secure storage?
Comment 2 Nathan Gervais CLA 2011-10-13 13:27:22 EDT
Yes, same computer, one is Helios PHP SR2 package with EGit 1.0 and the new config is the Indigo Javascript SR1 package with EGit 1.1

Here's the stack trace

org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://nathan@foundation.eclipse.org: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:130)
	at com.jcraft.jsch.Session.connect(Session.java:419)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:128)
	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:136)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:174)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:118)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:142)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:306)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:299)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$5.run(GitCloneWizard.java:278)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 3 Matthias Sohn CLA 2011-10-24 09:36:45 EDT
I tried cloning this repository using the nightly build version and EGit pops up a dialog asking for the password as I do not have a valid user for this repository.

Did you try with latest nightly version of EGit ?

Can you clone the repository on the same box with the same credentials using native Git ?

As I do not have ssh access to this repository I tried cloning another repository over ssh 
using user/password authentication
ssh://msohn@git.eclipse.org/gitroot/mylyn/org.eclipse.mylyn.reviews.git
and this works properly using EGit 1.1

Did you store the password in the secure store earlier ?
Comment 4 Nathan Gervais CLA 2011-10-24 15:40:30 EDT
(In reply to comment #3)
> Did you try with latest nightly version of EGit ?

I just installed Egit 1.2.0.201110240523 and the same error occurs.
 
> Can you clone the repository on the same box with the same credentials using
> native Git ?

This is a windows box and in dont have command line git enabled.

However i am able to clone this repo from another linux box that i have access to on the eclipse.org infra.

> Did you store the password in the secure store earlier ?
I dont beleive i've ever stored this password in the secure store.
Comment 5 Robin Rosenberg CLA 2012-04-05 01:36:38 EDT
*** Bug 374146 has been marked as a duplicate of this bug. ***
Comment 6 Robin Rosenberg CLA 2012-04-05 02:10:57 EDT
I can repeat this 100% with a fresh .ssh on both sides and not storing the credentials in the Eclipse password storage.

Potential patch at https://git.eclipse.org/r/5529.

The password handling is somewhat strange so something else may be needed to
make this smooth.
Comment 7 Robin Rosenberg CLA 2012-04-05 02:56:55 EDT
The patch addresses the case when the user did not supply a password.

That bug is triggered by another bug which is that Eclipse does not send the
password entered in the first page in the clone dialog.
Comment 8 Robin Rosenberg CLA 2012-10-06 17:56:01 EDT
In 2.0.

https://git.eclipse.org/r/#/c/5529/
Comment 9 Andre Piwoni CLA 2012-10-08 19:52:34 EDT
This bug has not been fixed, at least not in all cases.

In org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java the following line of code is incorrect:
 
if (i.getPromptText().equals("Password: ")) {..}

There's no space after password prompt in my case.
You may consider startsWith("Password:")

Andre Piwoni