[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using ssh+svn through non-standard port

From: Thomas Harold <thomas-lists_at_nybeta.com>
Date: Tue, 17 Nov 2009 12:08:20 -0500

On 11/17/2009 9:31 AM, Nikki Locke wrote:
> Our SVN server (on a Linux box) is accessed using SSH, but this listens on a non-standard port (for firewalling reasons - port 22 is busy doing something else, and to stop idiot hackers filling up the logs with their hacking attempts).
>
> We build the same software on both Linux and Windows. On Windows, I have set up a putty session, and I use the session name in my svn urls (e.g. "svn+ssh://@svnserver/repo"). On Linux I have set up a tunnel in the .subversion/config file, containing "svnserver = $SVN_SSH ssh -p 4001". The Linux urls are therefore of the form "svn+svnserver://nikki@123.456.789.123/repo.
>
> We have just decided to start using svn externals, and we have an issue with the url to use in the externals property - if we use the WIndows one, it doesn't work on Linux, and if we use the Linux one it doesn't work on Windows.
>
> I thought I could maybe add a similar tunnel in the Tortoise config file (which I found in ~\Application Data\Subversion), but I can't seem to get it working (I get "Network connection closed unexpectedly). This is what I used:
>
> svnserver = $SVN_SSH TortoisePlink -P 4001
>
> TortoisePlink is on my PATH.
>
> Any suggestions as to what is wrong with my tunnel line, or how else to be able to use the same url in both Windows and Linux?
>

You'll need to create a PuTTY session that is named as a combination of
the server name and the port number. This also fixes the CollabNet SVN
client on Windows.

http://www.tgharold.com/techblog/2007/07/setting-up-svnssh-on-alternate-point.shtml

http://svn.haxx.se/tsvnusers/archive-2007-01/0272.shtml

# Right-click on the Pageant icon in the system tray (I'm assuming that
you're loading the SSH public key that you use for SVN into Pageant).

# Choose "New Session"

# Enter the hostname / IP address and SSH port that you'll be connecting
to. If you're going to connect as "svn+ssh://svn.tgharold.com:2222",
then this would be "svn.tgharold.com" and "2222". You'll also want to
specify the username to login as in the profile before you save it.

# Go back to the "Session" tab and name the session as
"svn.tgharold.com:2222".

...

For Linux/Unix, you need to edit the ~/.ssh/config file.

Host svn.tgharold.com
Port 2222
User fred-svn
IdentityFile /home/fred/.ssh/svnkey

Which lets you use URLs like svn+ssh://svn.tgharold.com:2222/reponame on
both sides of the equation.

...

But the real solution for externals is to use the new "relative" path
formats.

../ -- Relative to the URL of the directory on which the svn:externals
property is set

^/ -- Relative to the root of the repository in which the svn:externals
property is versioned

// -- Relative to the scheme of the URL of the directory on which the
svn:externals property is set

/ -- Relative to the root URL of the server on which the svn:externals
property is versioned

http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2419019

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-11-17 18:56:55 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.