2

I was looking into adding my RSA keys into Keychain in my mac (macOS Sierra if that matters). One of the things that I found was to use ssh-agents so that whenever you generate a key, it will get added automatically to Keychain.

The problem is that I can't see any agent in the SSH Agent list in Eclipse SSH2 settings window. Am I missing anything?

I saw this post Eclipse git and ssh-agent but the plugin is not maintained anymore. I can't seem to find a way to add the export statement into an init script as I'm not sure which file that is.

Thanks enter image description here

kmugi
  • 343
  • 1
  • 4
  • 13

1 Answers1

0

Eclipse JGit can now work with the standard ssh-agent, so you need to run

ssh-add

on the command line of your Mac and provide the passphrase to your keys so the ssh-agent can load your keys and offer them to Eclipse over the socket.

This support is pretty new, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=541274 @howlger mentioned.

An earlier solution, which still works, is to set the GIT_SSH environment variable for Eclipse so that JGit uses the system SSH with the standard ssh-agent. The process to set environment variables for Applications in macOS is described here: Setting environment variables on eclipse

robcast
  • 485
  • 4
  • 11
  • What the hell is JGit? That's not available in the marketplace, and doesn't come with Eclipse – Ryan May 25 '23 at 02:36
  • 1
    EGit is Eclipse's "Git integration for Eclipse" and it uses JGit, the "Java implementation of Git". It comes with Eclipse, you don't have to install it. You can search for "git" in "Installed software", currently there is "Java implementation of Git | 6.5.0.202303070854-r | org.eclipse.jgit.feature.group | Eclipse JGit". – robcast Jun 01 '23 at 12:42
  • ahhhhh, thank you!! Pardon my bluntness! – Ryan Jun 02 '23 at 18:08