Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion with ssh for authentication

We have a Subversion server running on Linux. We have used to authenticate user with unencrypted password using passwd from conf folder for the subversion repository.

We have tried to change to use ssh authentication. I am not sure how to use ssh to authenticate via subversion. Based on the subversion manual, if i use

svn checkout svn+ssh://serverIP/trunk/project

i can type my ssh password and it authenticated, but it did show off

svn: No repository found in 'svn+ssh://ServerIP/trunk/project'

However, when i used 'svn://ServerIP/trunk/project' with plain-text password based on 'passwd' of the conf folder, I can check out the project source code.

Do I miss something for ssh ? I guess I was but I am not sure which part that I were missing was.

Thanks

like image 651
Tiger Avatar asked Oct 12 '09 14:10

Tiger


2 Answers

svn+ssh: doesn't just use SSH for authentication, but instead runs the entire communication via SSH. This means that the path you'll have to use is the actual, physical path to the respository on the server.

So if your repository on the server is found in /srv/svn/myrepo then the correct, full URI of you'd like to check out is svn+ssh://serverIP/srv/svn/myrepo/trunk/project.

Also note that you'll want to set up restricted shells for your SVN users or you'll give them full shell access to your server, which is usually not what you want to do.

like image 97
Joachim Sauer Avatar answered Sep 22 '22 06:09

Joachim Sauer


Normally, svn repositories can be found here:

svn://www.mysite.com/repo_name

...and svn over ssh repositories here:

svn+ssh://www.mysite.com/path-to-repos/repo_name

Please check this posts on serverfault.com:

  • Subversion path differences for svn and svn+ssh
  • Can’t access my SVN repository
like image 41
Andrejs Cainikovs Avatar answered Sep 21 '22 06:09

Andrejs Cainikovs