I have a SVN server set up where login can be done via virtual users (mysql). Those users can login to another services like proftpd and postfix. No real users exists in the server.

The SVN login can be done via libapache2-mod-svn, mod_authn_dbd and a virtual host like

<VirtualHost *:80>
    ServerName svn.domain.com
    <Location />
                DAV svn
                SVNParentPath /path/to/svn
                SVNListParentPath On
                Require valid-user
                AuthType Basic
                AuthName "SVN"
                AuthBasicProvider dbd
                AuthDBDUserPWQuery "select password from users where user = %s"

Now I would like to create similiar set up but using GIT, is that possible? I've read some articles like this one, but they all login users that are set via htpasswd and I would like to login via database using the same users.

  • for git I use gitlab – c4f4t0r May 20 at 21:43

This setup should be possible. Typically you can use any Authentication Provider on any Virtualhost.

You can follow the tutorial and just remove all mentioned Auth* parameters and use the ones from your working SVN configuration.

It is also possible to create a custom Auth section, which can be re-used in many Vhosts. This provides e.g. a way to share caches for e.g. LDAP lookups between Vhosts. The related configuration parameter is AuthnProviderAlias.


  • can you help me with some working code? – Matías Cánepa May 26 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.