No selectable SSH Agent in Eclipse 2020-12 (4.18.0)

Viewed 460

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

1 Answers

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

Related