SVN+SSH tunneling how to?

Hi, I’ve been trying to get svn working with the subversion integration in UE 4. I managed to get it working once, but then I removed some files and the editor broke the SVN connection, and now it can’t enable it again.
I get the following error message:

Error Failed to connect to source control. Check your settings and connection then try again.
Error svn: E170012: When using svn+ssh:// URLs, keep in mind that the --username and --password options are ignored because authentication is performed by SSH, not Subversion
Error svn: E170012: Unable to connect to a repository at URL 'svn+ssh://user@server.host.com/home/user/svnrepo'
Error svn: E170012: Can't create tunnel
Error svn: E720002: Can't create tunnel: The system cannot find the file specified.

Windows 8.1 64-bit, 4.4.3 build of the engine.

SVN+SSH is a requirement because my university’s computer science department servers require that. Support for the protocol would be really nice.

Hi,

Thanks for the report. We have not tested against ssh-based access to repositories, only svn://, http://, https:// and file:// URLs. If SVN+SSH access a prerequisite for you then we can look at getting it added to the backlog.

What platform are you seeing this on?

This has now been added to the backlog.

Hi same here, I need the ssh+svn because it is the only way I can expose an svn repo from my share web host provider (bluehost)

I’m working both on Windows and Mac (an iMac with bootcamp)

Thanks,

Hi, any updates on this? Tortoisesvn connects through svn+ssh fine, but when I try setting the source control to svn in editor using the same svn+ssh URL, I get:

Error svn: E170012: Can’t create tunnel
Error svn: E720002: Can’t create tunnel: The system cannot find the file specified.
Error Failed to connect to source control. Check your settings and connection then try again.

Hello muchcharles,

Unfortunately, the developers have decided to not dedicate resources to implementing this feature. If you do have time to edit the source code to implement this feature however, please feel free to submit a pull request and it will be reviewed to be integrated into the engine.

Same here. I would love to be able to use the addin source controll feature of svn through this protocoll rather then just through svn in explorer all the time. That would really increase workflow.

I also have this requirement. I think as a temporary solution, if there was an extra field under the Subversion provider settings where you could point to plink.exe, then we could configure our ssh connection and keys in putty. Then after the button is pressed, read the first seven characters of the url, and if it’s svn+ssh, use plink to connect to that session (the hostname in the url should be the same as the saved putty session name), and it should work.

That’s how TortoiseSVN does it, except they wrote a wrapper, TortoisePlink, which I think just suppresses stdout and all the DOS command windows.

If that sounds acceptable and someone will point me in the right direction, I’ll submit a pull request and take a look into it.

Hey guys, quick update on this. I got it to work by setting up my public key with PuTTY and then adding this environment variable:

Variable: SVN_SSH
Value: C:\\Program Files (x86)\\PuTTY\\plink.exe

Make sure you reboot after setting the environment variable unless you are just doing it one-off in a shell. You have to double backslash everything in the path even though you don’t for most windows other env variables.

Then you do your source control settings in engine like this:

Provider: Subversion
Repository: svn+ssh://putty_profile_name/absolute/path/to/repository
User Name: username
Labels Directory: tags
Password: leave empty for public key authentication

putty_profile_name should be the PuTTY profile you use to connect to your server, not your server’s hostname as you would do on unix.

So there are no source changes needed. Tortoise SVN itself didn’t need the environment variable even though it also used plink under the hood and that is probably what threw us off (plus the double backslash thing). Plink must be hardcoded in their client or set up a different way.

edit:

One tiny tweak to my solution; it caused a console to constantly pop up even though Unreal was launching the process with the SW_hide flag. Turns out it is because svn then goes on to lauch plink either without that flag, or plink doesn’t handle the flag correctly. Searching around a lot I found a workaround: use TortoiseSVN’s plink instead of PuTTY’s:

Variable: SVN_SSH
Value: C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe

You still need to make sure to use double backslashes in the environment variable.

1 Like

Hi guys, one more update to my solution. plink and TortoisePlink both use a 16K window size. I was collaborating with someone in Australia and they were getting terrible speeds.

What happens is if they have a 250ms ping, a 16K window size will only flush four times a second giving them a 64KB download rate.

The hack solution is to download the PuTTY source, open ssh.c and change this define:

#define OUR_V2_WINSIZE 16384

to a bigger number, like this:

#define OUR_V2_WINSIZE 131072

This may work worse if you have a really low bandwidth, low latency connection, so you’ll have to sort of tune it to your situation unfortunately. More info here:

https://marci.blogs.balabit.com/2009/11/putty-performance/

Also, to build PuTTY on VS 2015, you need to open the VS2012 solution in:

puttysrc_checkout\windows\VS2012

and on each project (pageant, plink, etc.), rlick click, click properties, Configuration Properties:VC++ Directories: and add this to to the end of what is already in “Include Directories”:

$(ProjectDir)\..\..\..\;

That basically adds the overall sourcecode root to the include path. Otherwise you will get an error about version.h not found.

You can make the same change for TortoisePlink in “ext/TortoisePlink/ssh.c”, but it has more much complicated build instructions and I haven’t tested that yet.

This results in it working hundreds of times faster over high latency connections like Australia to New York.

ALT SOLUTION:
#SVN+SSH+UE4 CONNECT TO Source Control

  1. Go to Config file which is accessed via Tortoise Settings
  2. Add line to tunnels section:
    ssh = $SVN_SSH C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe

UE4 Settings are the same as in other posts above