diff --git a/rhodecode/apps/ssh_support/lib/backends/svn.py b/rhodecode/apps/ssh_support/lib/backends/svn.py --- a/rhodecode/apps/ssh_support/lib/backends/svn.py +++ b/rhodecode/apps/ssh_support/lib/backends/svn.py @@ -67,9 +67,12 @@ class SubversionTunnelWrapper(object): def command(self): root = self.server.get_root_store() + username = self.server.user.username + command = [ self.server.svn_path, '-t', '--config-file', self.svn_conf_path, + '--tunnel-user', username, '-r', root] log.debug("Final CMD: %s", ' '.join(command)) return command diff --git a/rhodecode/apps/ssh_support/tests/test_server_svn.py b/rhodecode/apps/ssh_support/tests/test_server_svn.py --- a/rhodecode/apps/ssh_support/tests/test_server_svn.py +++ b/rhodecode/apps/ssh_support/tests/test_server_svn.py @@ -70,8 +70,10 @@ class TestSubversionServer(object): def test_command(self, svn_server): server = svn_server.create() expected_command = [ - svn_server.svn_path, '-t', '--config-file', - server.tunnel.svn_conf_path, '-r', svn_server.root + svn_server.svn_path, '-t', + '--config-file', server.tunnel.svn_conf_path, + '--tunnel-user', svn_server.user.username, + '-r', svn_server.root ] assert expected_command == server.tunnel.command()