I've set up and configuered gitolite
and wish to configure the cgit
web interface to it.
When browsing a directory using cgit
I get the error:
No repositories found
When a new repository is created gitolite
creates a corresponding directory to it under /home/git/repositories
automagically. cgit
is configuered to read these repositories using:
project-list=/home/git/projects.list
scan-path=/home/git/repositories
The problem is that these repositories doesn't seem to be bare repositories. If I instead manually clone one of these repositories using
git clone --bare user@server:repo
it seems to work. I really don't want to do this manually every time a new repository is checked in. Why aren't the repositories created by gitolite
bare already? How can I automate this?
Turns out - after trying to verify it several times - this is just a file system rights issue. After trying
chown -R www-data:www-data repositories/repo
to force ownership into my apache user running cgit
, the repository shows up in the web interface.
The proper solution is to add the apache user to the git
group and change the value umask
in .gitolite.rc
to
$REPO_UMASK=0027
Note: with Gitolite V3 or 'g3', that would be (see doc):
$UMASK=0027
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With