All of lore.kernel.org
 help / color / mirror / Atom feed
* egit and RSA keys for SSH
@ 2009-06-15  0:16 Aaron Hicks
  2009-06-15 14:27 ` Tay Ray Chuan
  2009-06-15 15:03 ` Shawn O. Pearce
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Hicks @ 2009-06-15  0:16 UTC (permalink / raw)
  To: git

Hi everyone,

We have a git repository set up with gitosis and it requires RSA keys to authenticate developers who have rights to push to this repository. i.e. they are blessed with write privileges. Github uses a similar method.

We use Eclipse, so we would like Eclipse to integrate with Git. So we grabbed egit from http://www.jgit.org/update-site and used the Eclipse installer (Like we do all the other Eclipse plug-in, given that the egit/jgit sites don't give instructions otherwise it seems to be the thing to do).

The problem is I can't see how to associate an RSA key in order to authenticate the SSH login with our gitosis repository (or GitHub). We have PuTTY installed and use Pageant to manage keys, and the required key is already loaded. We've used the 'import project' wizard, and initialised git in our project workspace, and though egit becomes aware that the project is a git repository, there seem to be no menu items for associating an RSA key with a remote repository.

The wish list states that this is already implemented, but gives _no_ instructions on how it's done. http://git.or.cz/gitwiki/EclipsePluginWishlist#SupportforSSHKeys

I've searched the git mailing archives for egit with RSA, key, SSH, and private key, and though there is a lot of discussion about egit and keys and sessions, there are no instructions on how it's done.

Can anyone help with this?

Regards,

Aaron Hicks


Please consider the environment before printing this email
Warning:  This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: egit and RSA keys for SSH
  2009-06-15  0:16 egit and RSA keys for SSH Aaron Hicks
@ 2009-06-15 14:27 ` Tay Ray Chuan
  2009-06-15 15:04   ` Shawn O. Pearce
  2009-06-15 15:03 ` Shawn O. Pearce
  1 sibling, 1 reply; 6+ messages in thread
From: Tay Ray Chuan @ 2009-06-15 14:27 UTC (permalink / raw)
  To: Aaron Hicks; +Cc: git

Hi,

On Mon, Jun 15, 2009 at 8:16 AM, Aaron
Hicks<HicksA@landcareresearch.co.nz> wrote:
> The problem is I can't see how to associate an RSA key in order to authenticate the SSH login with our gitosis repository (or GitHub). We have PuTTY installed and use Pageant to manage keys, and the required key is already loaded. We've used the 'import project' wizard, and initialised git in our project workspace, and though egit becomes aware that the project is a git repository, there seem to be no menu items for associating an RSA key with a remote repository.

For git, I set the GIT_SSH environment variable to PuTTY's plink.exe
location. I wonder if this might work with egit?

-- 
Cheers,
Ray Chuan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: egit and RSA keys for SSH
  2009-06-15  0:16 egit and RSA keys for SSH Aaron Hicks
  2009-06-15 14:27 ` Tay Ray Chuan
@ 2009-06-15 15:03 ` Shawn O. Pearce
  2009-06-15 22:49   ` Aaron Hicks
  1 sibling, 1 reply; 6+ messages in thread
From: Shawn O. Pearce @ 2009-06-15 15:03 UTC (permalink / raw)
  To: Aaron Hicks; +Cc: git

Aaron Hicks <HicksA@landcareresearch.co.nz> wrote:
> We have a git repository set up with gitosis and it requires RSA
> keys to authenticate developers who have rights to push to this
> repository. i.e. they are blessed with write privileges. Github
> uses a similar method.
> 
> We use Eclipse, so we would like Eclipse to integrate with Git. So
> we grabbed egit from http://www.jgit.org/update-site and used the
> Eclipse installer (Like we do all the other Eclipse plug-in, given
> that the egit/jgit sites don't give instructions otherwise it seems
> to be the thing to do).
> 
> The problem is I can't see how to associate an RSA key in order
> to authenticate the SSH login with our gitosis repository (or
> GitHub). We have PuTTY installed and use Pageant to manage keys, and
> the required key is already loaded.

Unfortunately both PuTTY's Pageant and OpenSSH's ssh-agent are
not supported from JSch, which is the SSH client used within JGit,
which is what is underneath EGit.  Consequently, you can't use the
agent to manage your keys.

>From within Eclipse, if you go to Window > Preferences > General >
Network Connections > SSH2 you can configure your RSA keys.  But,
these keys are configured globally for the workspace, i.e. its
more like loading the key into the agent than it is about binding
a particular key to a particular host.

To force binding a key to a host, use ~/.ssh/config.  JGit knows
how to read this file on startup and uses the Host blocks to do
some configuration control over the connection.

E.g. if you use a URL like "git@gitserver.example.com:foo.git"
then you can put the following in your ~/.ssh/config to force using
a specific SSH key:

  Host gitserver.example.com
    IdentityFile .ssh/id_gitkey

Note that ~/.ssh/config is cached on startup of EGit, so you'll
need to completely restart the Eclipse workspace after making any
changes to it.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: egit and RSA keys for SSH
  2009-06-15 14:27 ` Tay Ray Chuan
@ 2009-06-15 15:04   ` Shawn O. Pearce
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn O. Pearce @ 2009-06-15 15:04 UTC (permalink / raw)
  To: Tay Ray Chuan; +Cc: Aaron Hicks, git

Tay Ray Chuan <rctay89@gmail.com> wrote:
> On Mon, Jun 15, 2009 at 8:16 AM, Aaron
> Hicks<HicksA@landcareresearch.co.nz> wrote:
> > The problem is I can't see how to associate an RSA key in
> > order to authenticate the SSH login with our gitosis repository (or
> > GitHub). We have PuTTY installed and use Pageant to manage keys, and
> > the required key is already loaded. We've used the 'import project'
> > wizard, and initialised git in our project workspace, and though egit
> > becomes aware that the project is a git repository, there seem to
> > be no menu items for associating an RSA key with a remote repository.
> 
> For git, I set the GIT_SSH environment variable to PuTTY's plink.exe
> location. I wonder if this might work with egit?

No.  JGit (the library under EGit) does not honor GIT_SSH.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: egit and RSA keys for SSH
  2009-06-15 15:03 ` Shawn O. Pearce
@ 2009-06-15 22:49   ` Aaron Hicks
  2009-06-16  1:03     ` Shawn O. Pearce
  0 siblings, 1 reply; 6+ messages in thread
From: Aaron Hicks @ 2009-06-15 22:49 UTC (permalink / raw)
  To: git

Hi Shawn,

I've followed your instructions, and added the same RSA key that I use with Git and Git Extensions (using Windows here), but eGit still asks for a password for a the git user (which is password disabled, and requires RSA). I'm telling eGit to access via "git + SSH".

I'm assuming for windows the ~/.ssh should be in C:\path\to\profile\username\.ssh ?

I'm not 100% that eGit has installed correctly in Eclipse (3.4.2 Ganymede, Windows XP SP3, Java 1.6.0_13) either. I can't see many git-like commands in the context menus for files and projects.

Regards,

Aaron Hicks

> -----Original Message-----
> From: spearce@spearce.org [mailto:spearce@spearce.org]
> Sent: Tuesday, 16 June 2009 3:04 a.m.
> To: Aaron Hicks
> Cc: git@vger.kernel.org
> Subject: Re: egit and RSA keys for SSH
>
> Aaron Hicks <HicksA@landcareresearch.co.nz> wrote:
> > We have a git repository set up with gitosis and it requires RSA
> > keys to authenticate developers who have rights to push to this
> > repository. i.e. they are blessed with write privileges. Github
> > uses a similar method.
> >
> > We use Eclipse, so we would like Eclipse to integrate with Git. So
> > we grabbed egit from http://www.jgit.org/update-site and used the
> > Eclipse installer (Like we do all the other Eclipse plug-in, given
> > that the egit/jgit sites don't give instructions otherwise it seems
> > to be the thing to do).
> >
> > The problem is I can't see how to associate an RSA key in order
> > to authenticate the SSH login with our gitosis repository (or
> > GitHub). We have PuTTY installed and use Pageant to manage keys, and
> > the required key is already loaded.
>
> Unfortunately both PuTTY's Pageant and OpenSSH's ssh-agent are
> not supported from JSch, which is the SSH client used within JGit,
> which is what is underneath EGit.  Consequently, you can't use the
> agent to manage your keys.
>
> From within Eclipse, if you go to Window > Preferences > General >
> Network Connections > SSH2 you can configure your RSA keys.  But,
> these keys are configured globally for the workspace, i.e. its
> more like loading the key into the agent than it is about binding
> a particular key to a particular host.
>
> To force binding a key to a host, use ~/.ssh/config.  JGit knows
> how to read this file on startup and uses the Host blocks to do
> some configuration control over the connection.
>
> E.g. if you use a URL like "git@gitserver.example.com:foo.git"
> then you can put the following in your ~/.ssh/config to force using
> a specific SSH key:
>
>   Host gitserver.example.com
>     IdentityFile .ssh/id_gitkey
>
> Note that ~/.ssh/config is cached on startup of EGit, so you'll
> need to completely restart the Eclipse workspace after making any
> changes to it.
>
> --
> Shawn.

Please consider the environment before printing this email
Warning:  This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: egit and RSA keys for SSH
  2009-06-15 22:49   ` Aaron Hicks
@ 2009-06-16  1:03     ` Shawn O. Pearce
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn O. Pearce @ 2009-06-16  1:03 UTC (permalink / raw)
  To: Aaron Hicks; +Cc: git

Aaron Hicks <HicksA@landcareresearch.co.nz> wrote:
> Hi Shawn,
> 
> I've followed your instructions, and added the same RSA key that I use with Git and Git Extensions (using Windows here), but eGit still asks for a password for a the git user (which is password disabled, and requires RSA). I'm telling eGit to access via "git + SSH".
> 
> I'm assuming for windows the ~/.ssh should be in C:\path\to\profile\username\.ssh ?

Unless Cygwin is installed, in which case its likely in Cygwin.

Technically EGit uses user.home property from Java, which should
be the profile directory, or %HOME% in cmd.  Not sure.

 
> I'm not 100% that eGit has installed correctly in Eclipse (3.4.2 Ganymede, Windows XP SP3, Java 1.6.0_13) either. I can't see many git-like commands in the context menus for files and projects.
> 
> Regards,
> 
> Aaron Hicks
> 
> > -----Original Message-----
> > From: spearce@spearce.org [mailto:spearce@spearce.org]
> > Sent: Tuesday, 16 June 2009 3:04 a.m.
> > To: Aaron Hicks
> > Cc: git@vger.kernel.org
> > Subject: Re: egit and RSA keys for SSH
> >
> > Aaron Hicks <HicksA@landcareresearch.co.nz> wrote:
> > > We have a git repository set up with gitosis and it requires RSA
> > > keys to authenticate developers who have rights to push to this
> > > repository. i.e. they are blessed with write privileges. Github
> > > uses a similar method.
> > >
> > > We use Eclipse, so we would like Eclipse to integrate with Git. So
> > > we grabbed egit from http://www.jgit.org/update-site and used the
> > > Eclipse installer (Like we do all the other Eclipse plug-in, given
> > > that the egit/jgit sites don't give instructions otherwise it seems
> > > to be the thing to do).
> > >
> > > The problem is I can't see how to associate an RSA key in order
> > > to authenticate the SSH login with our gitosis repository (or
> > > GitHub). We have PuTTY installed and use Pageant to manage keys, and
> > > the required key is already loaded.
> >
> > Unfortunately both PuTTY's Pageant and OpenSSH's ssh-agent are
> > not supported from JSch, which is the SSH client used within JGit,
> > which is what is underneath EGit.  Consequently, you can't use the
> > agent to manage your keys.
> >
> > From within Eclipse, if you go to Window > Preferences > General >
> > Network Connections > SSH2 you can configure your RSA keys.  But,
> > these keys are configured globally for the workspace, i.e. its
> > more like loading the key into the agent than it is about binding
> > a particular key to a particular host.
> >
> > To force binding a key to a host, use ~/.ssh/config.  JGit knows
> > how to read this file on startup and uses the Host blocks to do
> > some configuration control over the connection.
> >
> > E.g. if you use a URL like "git@gitserver.example.com:foo.git"
> > then you can put the following in your ~/.ssh/config to force using
> > a specific SSH key:
> >
> >   Host gitserver.example.com
> >     IdentityFile .ssh/id_gitkey
> >
> > Note that ~/.ssh/config is cached on startup of EGit, so you'll
> > need to completely restart the Eclipse workspace after making any
> > changes to it.
> >
> > --
> > Shawn.
> 
> Please consider the environment before printing this email
> Warning:  This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Shawn.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-06-16  1:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15  0:16 egit and RSA keys for SSH Aaron Hicks
2009-06-15 14:27 ` Tay Ray Chuan
2009-06-15 15:04   ` Shawn O. Pearce
2009-06-15 15:03 ` Shawn O. Pearce
2009-06-15 22:49   ` Aaron Hicks
2009-06-16  1:03     ` Shawn O. Pearce

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.