This was deceptively difficult.
The problem is, svn checkout has a --username ARG option, but that only applies to Subversion. We use svn+ssh:// for security.
I tried the obvious things - svn+ssh://
Well, Subversion will let you define your own tunnelling protocol if you define the programs which they use. The trick is this: In your ~/.subversion/config, create an entry along these lines:
dummyssh = dummyssh
Then create a BASH script somewhere in your path called dummyssh and make it executable. The script should basically be this:
#!/bin/bash
ssh -l[your username] $*
Now you just do
svn checkout --usernamesvn+dummyssh://[host]
And you can pull it off.
I have to admit, I wish the Subversion manual included this information. Hope somebody finds it useful.
4 comments:
Not sure why it didn't work for you, but in situations where I had to checkout using a different username, I merely specified it as "svn co svn+ssh://user@host/path/to/svn/repo" and it worked flawlessly.
Peter
Correction:
"svn co svn+ssh://user@host:/path/to/svn/repo"
Peter
Thanks, this is the only site I found such information. Very helpful.
It must be
[tunnels]
dummyssh = dummyssh
in the svn config file.
Post a Comment