From: "Shawn O. Pearce" <spearce@spearce.org>
To: Aaron Hicks <HicksA@landcareresearch.co.nz>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: egit and RSA keys for SSH
Date: Mon, 15 Jun 2009 08:03:41 -0700 [thread overview]
Message-ID: <20090615150341.GX16497@spearce.org> (raw)
In-Reply-To: <F2969C1B08CBEE42B78C04C280D578E72CAF41E19B@donkey.landcare.ad.landcareresearch.co.nz>
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.
next prev parent reply other threads:[~2009-06-15 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-06-15 22:49 ` Aaron Hicks
2009-06-16 1:03 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090615150341.GX16497@spearce.org \
--to=spearce@spearce.org \
--cc=HicksA@landcareresearch.co.nz \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).