Gitolite support patch
ranger at risk.ee
Tue Jan 31 19:25:54 CET 2012
I'm using gitolite (https://github.com/sitaramc/gitolite) in my git
server to limit user's access to specific repos only.
Since I'm using cgit as the web frontend I needed the same functionality
there as well.
I've created a quick patch to add gitolite config file parsing support
It reads and parses gitolite.conf config file, extracts the information
from there (users and groups) and creates allowed repo list. The user
name is retrieved from REMOTE_USER environment variable since I use
basic authentication. The config file parsing is basic but that
currently fits to my needs.
I do not know if there is anyone who needs the same functionality but
nevertheless I'm attaching my patch. Maybe it could be useful to someone
else as well.
P.S. I tried to use the gl-auth-command perl script that gitolite itself
uses, but under CGI and suexec it did not work, so I rather took the
config file parsing approach.
More information about the CGit