[TAG] SVN authentication

Dumont Jean chaneau at gmail.com
Thu Mar 17 15:36:57 MSK 2011


Le 16/03/11 21:49, Ben Okopnik a écrit :
> Hi, all -
> 
Hi

The easiest way is to ask Apache to validate your users

Something along the lines:

<VirtualHost xx.xx.xx.xx:80>
 ServerName your.server.name # no need to explain
 DocumentRoot /var/www/ # does not matter won't be used
 RewriteEngine on # to go to the right url
 RewriteRule ^/$ /svn [L,R] # this one

# You can read the repositoory anonymously but not write to it

 <Location /svn>
  DAV svn # turn the dav mode on
  SVNPath /your/svnroot #
  SVNIndexXSLT /svnindex.xsl # to customize the look
  AuthType Basic # no need to explain
  AuthName "Subversion repository" # whatever
  AuthUserFile /etc/subversion/password # Apache must be able to read it
  <LimitExcept GET PROPFIND OPTIONS REPORT>
   Require valid-user
  </LimitExcept>
 </Location>

# next an example with no access except when authentified

<Location /svn/documents>
  DAV svn
  SVNPath /svn-root-private
  SVNIndexXSLT /svnindex.xsl
  AuthType Basic
  AuthName "Subversion Documents repository"
  AuthUserFile /etc/subversion/password-docs
  Require valid-user
 </Location>

</VirtualHost>


You can then create your users with htpasswd and no need to have systems
users

HTH

Good day and keep doing the fantastic job with LG

-- 

HTH



More information about the TAG mailing list