0

When I first set up SVN on my server, I opted for the WebDAV http://... access method. However, I could not find out how to enable multiple repositories with this configuration. With this method, any one commit incremented the revision counter for all projects.

Next, I switched over the the svn:// protocol using the included svnserve daemon. Using the svnserve -d -r /storage/svn/ options, i was able to serve multiple seperate repositories. However, my partner and I were none to pleased that our passwords had to be stored in plaintext files.

What I need is a way to make available multiple repositories, many of which will have the same access permissions. Would someone be kind enough to point me in the right direction?

2 Answers 2

0

Assuming you have an structure like:

  • /var/repositories/repo1
  • /var/repositories/repo2
  • /var/repositories/repo3

You need something like:

        <Location /svn>
                DAV svn
                SVNParentPath /var/repositories
                AuthType Basic
                Allow from all
                AuthzLDAPAuthoritative off
                AuthName "SVN Auth"
                AuthzSVNAccessFile /var/security/svnauthz.conf
                AuthUserFile /var/security/passwd.conf
                Require valid-user
        </Location>

For an ease administration I recommend you to use SVNManager . This will help you to create repositories, manage permissions and groups.

For an ease visibility and navigation of the repository using http I recommend you to use websvn This will help you to navigate through the repository, make diffs and read code.

2
  • To clarify, this is for WebDAV access to multiple repos. The SVNParentPath is key. Jun 13, 2011 at 13:57
  • I got an error when i added the AuthzLDAPAuthoritative off line. Something about a possible misspelling? What is the purpose of that line?
    – Peaches491
    Jun 13, 2011 at 14:16
0

I suppose there are two common ways to avoid storing cleartext passwords in the svnserve config. Both options work well across multiple repositories and build on your svnserve setup. Both options are faster than WebDAV access, at least in SVN 1.6 and earlier.

  1. Authenticating with SASL
  2. Tunneling over SSH

I've linked the options to the official SVN documentation since they're a bit long to explain in this answer.

SASL is reasonably easy to setup and has the advantage of pluggable authentication plugins, from a basic file with MD5 hashes to Kerberos or Active Directory integration. Quite powerful. This option does not require local system accounts.

SSH is a bit harder to setup but many software developers already are familiar with SSH authentication and already have een SSH keypair that they use to authenticate to their servers. This option requires local system accounts for the committers, but does not require an svnserve daemon. Your client connects over svn+ssh:// protocol. and starts its own svnserve process on the server. The encryption and authentication is done by the ssh client instead of the SVN client, so you should use an ssh password-caching tool such as pageant (on Windows) to avoid repeatedly entering your password. The SSH option is quite popular with distributed version control systems such as Git and Mercurial.

Check the official SVNBook docs for a more detailed description and setup.

1
  • This seems to be a bit above my head. Still definitely worth a +1 for your time and effort
    – Peaches491
    Jun 13, 2011 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .