Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitolite + cgit: No repositories found

I've set up and configuered gitolite and wish to configure the cgit web interface to it.

Problem:

When browsing a directory using cgit I get the error:

No repositories found

Setup

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?

like image 986
Johan Sjöberg Avatar asked May 09 '11 14:05

Johan Sjöberg


1 Answers

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
like image 199
Johan Sjöberg Avatar answered Sep 25 '22 16:09

Johan Sjöberg