Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I setup subversion with ssh tunnel in Eclipse?

I have a remote server that hosts my subversion repository on a non-standard ssh port. I want to use Eclipse's subclipse plugin as my client end to access the SVN repository. I can access the repository fine by using svn+specialssh://... where specialssh is a tunnel profile setup in my ~/.subversion/config.

In subclipse I tried to input the URL of the repository as: svn+specialssh:// but that doesn't work.

like image 498
MikeN Avatar asked Jan 25 '09 23:01

MikeN


People also ask

Does SVN use SSH?

Assembla supports connecting to SVN repositories using SVN+SSH protocol, which provides security advantages. In this section we will discuss how you can set up your SVN client to use this protocol on Linux, Mac, and Windows computers.

What is SVN plugin for Eclipse?

Eclipse is an open-source and free, java-based development platform. It is well known for its excellent plug-ins that allow developers to develop and test code written in different programming languages. Eclipse IDE support built-in integration for Subversion.


2 Answers

First, I set up my tunnel to my repository, which lives behind the firewall on my home network:

ssh -L 9000:10.5.128.5:3690 root@<mypublicallyexposedaddress>

10.5.128.5 is the internal address of my repository host. Port 3690 is where svn listens.

Then in Eclipse, I configure the repository:

svn://localhost:9000/gwt

And there you go. This is not the only way to do it. I've also use an approach where Eclipse has to know it's ssh, and the plugin has to support it, which they do, but this approach is just my personal preference.

On second thought, you don't need anything that complicated. Try:

svn+ssh://host:port/directory
like image 187
Don Branson Avatar answered Oct 06 '22 17:10

Don Branson


Add the ssh connection configuration to your ~/.ssh/config file:

Host svnserver
    HostName your.real.hostname.here
    Port 1234
    User you

If you then specify "svnserver" as the hostname in any ssh/svn+ssh configuration, ssh should be able to resolve everything by simply reading your config file.

like image 30
innaM Avatar answered Oct 06 '22 15:10

innaM