Thursday, July 2, 2015

How to install eclipse plugins via SSH tunnel

Eclipse may fail to install plugins due to the requests being blocked by a corporate proxy.  If you can find a server that does not have its http traffic filtered by the proxy, eclipse can fetch the plugins via an SSH tunnel.

In this example, 12345 is the port to open the tunnel on, jenkins1 is the server hostname.

Run the following in cygwin/gow and leave the session open:

ssh -D 12345 mylogin@jenkins1

Or if you use public/private key authentication:

ssh -i -D 12345 mylogin@jenkins1

In eclipse,

  1. Go to Window -> Preferences -> General -> Network Connections
  2. Set the Active Provider to Manual
  3. Clear the HTTP and HTTPS manual proxies
  4. Edit the SOCKS proxy, and set host:port to localhost:12345
  5. Click OK
  6. Restart Eclipse
  7. Go to Help -> Install New Software and proceed as normal.