i've installed and configured both gitolite and gitweb. gitolite works fine, all repositories and users work as expected.. but when i use gitweb, i see a 404 - no projects found. i went on to see that projects.list is empty. The permission of projects.list file is 640 and the user and group are same "git".
I'm guessing gitolite adds a new repository to projects.list as well, right? My project root is /home/git/repositories.
Note: This has been reworked in newer versions of gitolite; here's the relevant documentation. You can still give read permissions to the special user "gitweb" as before, and you can also add lines like this to repos:
config gitweb.owner = owner name
config gitweb.description = some description
config gitweb.category = some category
If at least one of those config parameters is set for a repo, it will be made accessible to gitweb.
As before, "made accessible to gitweb" means "magically added to projects.list".
Original answer:
Gitolite sensibly defaults to the most restrictive permissions - no one can see a repository until you tell it to let them. This of course includes gitweb. In order for gitweb to see a repository, quoting the gitolite.conf documentation:
Similarly, give read permission to gitweb to allow the gitweb CGI to show the repo. Something like this:
repo foo bar baz R = gitweb
This gives you a quick way to offer multiple repos up for gitweb and/or daemon access.
However, setting a description for the project also enables gitweb permissions so you can do it that way if you want. Of course in this case you have to deal with each repo separately. Add lines like this to gitolite.conf:
foo = "some description" bar = "some other description" baz = "yet another description"
You can also specify an owner for gitweb to show, if you like; for example I might use:
gitolite "Sitaram Chamarty" = "fast, secure, fine-grained, access control for git"
Gitolite only places repositories in projects.list if you've told it to make them available to gitweb via one of those methods. It'll use the owner and description to populate projects.list as well, so it's usually best to do it that way. Do note that if your web server is running as a different user from Gitolite, you'll need to make sure it somehow has access to the relevant directories, which are hidden from other users by default. There's some example documentation about more complex cases: gitolite-gitweb-http-backend