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" </Location> </VirtualHost>
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.
Answer
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
.
https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authnprovideralias
Attribution
Source : Link , Question Author : Matías Cánepa , Answer Author : hargut