Bug 352385 - Unable to clone repository via ssh - egit won't give a chance to enter passphrase
Summary: Unable to clone repository via ssh - egit won't give a chance to enter passph...
Status: ASSIGNED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 15:14 EDT by Andrew Gvozdev CLA
Modified: 2011-09-13 20:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2011-07-18 15:14:27 EDT
I am trying to clone remote CDT repository via ssh in new workspace but having problems both in Import wizard and from Git Repositories perspective.
I setup my ssh key correctly but in this scenario obviously haven't entered my passphrase yet. When I try to clone the repository I would expect "Enter your passphrase" dialog. Instead, I am getting "Auth fail".

My ssh key is working fine. As a workaround I can export existing repository on disk making use of the ssh key and access it once entering the passphrase so it gets into the system. After that I can clone the first repository with no problems.

  Eclipse EGit	1.1.0.201107171612	org.eclipse.egit.feature.group	Eclipse EGit
  Eclipse JGit	1.1.0.201107141117	org.eclipse.jgit.feature.group	Eclipse JGit
Comment 1 Christian Campo CLA 2011-08-02 05:14:41 EDT
You dont reference what platform you are using (Windows, Mac etc)....

I found your problem to happen when it is not really finding the public key location. So for windows that would be that the key is actually in
c:/Users/xyz/.ssh/id_rsa.pub but the default in Eclipse (General/Network Connections/SSH2) defaults to c:/Users/xyz/ssh .... For some reason the default is "ssh" and not ".ssh".

The problem I am getting is this error message "Cannot list the available branches. Reason: ssh://git@xxx.xxx.xx:22: Passphrase for c:/Users/campo/.ssh/id_rsa

Some as you I never got a chance to actually enter a passphrase....(my problem is with the nightly build of 1.Aug though...so a pretty edgeeee version....)
Comment 2 Matthias Sohn CLA 2011-08-02 06:38:49 EDT
(In reply to comment #1)
> You dont reference what platform you are using (Windows, Mac etc)....
> 
> I found your problem to happen when it is not really finding the public key
> location. So for windows that would be that the key is actually in
> c:/Users/xyz/.ssh/id_rsa.pub but the default in Eclipse (General/Network
> Connections/SSH2) defaults to c:/Users/xyz/ssh .... For some reason the default
> is "ssh" and not ".ssh".

AFAIK this wrong default on Windows for ssh key folder was fixed in Indigo
Comment 3 Christian Campo CLA 2011-08-02 06:51:10 EDT
not really we(In reply to comment #2)
> (In reply to comment #1)
> > You dont reference what platform you are using (Windows, Mac etc)....
> > 
> > I found your problem to happen when it is not really finding the public key
> > location. So for windows that would be that the key is actually in
> > c:/Users/xyz/.ssh/id_rsa.pub but the default in Eclipse (General/Network
> > Connections/SSH2) defaults to c:/Users/xyz/ssh .... For some reason the default
> > is "ssh" and not ".ssh".
> 
> AFAIK this wrong default on Windows for ssh key folder was fixed in Indigo

No I don't think so….Just (2 secs ago) installed a fresh RCP Indigo build with an empty workspace and the default was still …../ssh and not /.ssh
Comment 4 Christian Campo CLA 2011-08-02 07:19:37 EDT
I have opened a separate bug for my problem, since I am not sure it has the same cause… https://bugs.eclipse.org/bugs/show_bug.cgi?id=353561. Also the problem with the passphrase that I am having only exist in the nightly build of 1.1. and not in the 1.0 version.
Comment 5 Andrew Gvozdev CLA 2011-08-02 09:54:54 EDT
(In reply to comment #1)
> You dont reference what platform you are using (Windows, Mac etc)....
> I found your problem to happen when it is not really finding the public key
> location. So for windows that would be that the key is actually in
> c:/Users/xyz/.ssh/id_rsa.pub but the default in Eclipse (General/Network
> Connections/SSH2) defaults to c:/Users/xyz/ssh .... For some reason the default
> is "ssh" and not ".ssh".
This problem is unrelated to platform. I experience this problem on Linux, Win 7 and Win XP. On Windows I don't even use "ssh" folder, instead I specify my own location. As I said, that works for other workflows and the ssh key is working for this workflow if its passphrase was entered previously elsewhere.
Comment 6 Matthias Sohn CLA 2011-09-13 20:10:21 EDT
pushed fix for review http://egit.eclipse.org/r/#change,4244