Subversion & MySQL

Discussion in 'Installation/Configuration' started by barney.parker, Nov 28, 2009.

  1. barney.parker

    barney.parker New Member


    I want to set up a subversion server on my network, and already have a table with user accounts in a MySQL table.

    Can anyone give me some advice / point me in the right direction on how to enable mysql based authentication with Subversion?

    I would like to make the subversion server work via Apache/http if possible...

  2. falko

    falko Super Moderator ISPConfig Developer

  3. barney.parker

    barney.parker New Member

    Thanks! That looks perfect!

    I will post back any notes i have on the installation/setup
  4. barney.parker

    barney.parker New Member

    OK, that was a pretty good article and sent my in the right direction for the most part, but i have a small issue.

    I have the following in /etc/apache2/mods-available/dav_svn.conf

    <Location /svn>

    #enable the repository
    DAV svn

    #For multiple repositories, set the Parent Path
    SVNParentPath /var/svn

    AuthType Basic
    AuthName “Subversion Repository”
    AuthUserFile /dev/null

    AuthBasicAuthoritative Off

    AuthMySQL_Host localhost
    AuthMySQL_DB SVNAuth
    AuthMySQL_User root
    AuthMySQL_Password myjenifer
    AuthMySQL_Password_Table users
    AuthMySQL_Username_Field login
    AuthMySQL_Password_Field pass
    AuthMySQL_Empty_Passwords off
    AuthMySQL_Encryption_Types Plaintext
    AuthMySQL_Authoritative on

    Require valid-user

    As long as a user is in my database table, they are able to access any repository in the /var/svn/ path.

    I would like to be able to control access to individual repositories. My initial thoughts were to use the group table and field entries for mod_auth_mysql, but it appears that would only work if i create a new <Location > entry for each and every repository i create, and would require the need for a restart of Apache. Ideally a user should only have access to a repository if it has both a valid password and a group of the same name when using two separate tables for user/pass and user/group)

    I must admit i am pretty new to this, and am finding Apache Authentication to be fairly complex. I am pretty sure i must be missing something here, so if anyone could point me in the right direction i would be extremely grateful!!!


Share This Page