tags:

views:

49

answers:

1

Installed GitWeb and CGit to tryout web interfaces to my Git/Gitosis repositories. Runing on Fedora 13 and my Gitosis is working great. I installed gitweb and cgit and setup the configs to point to my repositories but neither gitweb or cgi will list the repositories. Gitweb shows the gitweb page but shows:

404 - No projects found

I have the proper directory listed in the /etc/gitweb.conf file of:

 $projectroot = "/var/lib/gitosis/repositories";
 $projects_list = "/var/lib/gitosis/gitosis/projects.list";
 $export_ok="";
 $strict_export = "true";

CGit shows the cgit page but shows:

Not a git repository: '/var/lib/gitosis/repositories/code/test.git'

when I click on this test repository link (yes it exists). I have the proper directory listed in the /etc/cgitrc file of:

 repo.url=Test Repo
 repo.path=/var/lib/gitosis/repositories/code/test.git
 repo.desc=master test repository
 repo.owner=gitosis@gitserv
 repo.readme=info/web/about.html

Because both do not list the repositories I feel it must be my configuration but I can not seem to figure out what to config to get these to display. I have my repositories SymLinked in /var/lib/gitosis/repositories which points to a directory /home/git. I also have my repositories set under /var/lib/gitosis/repositories as code and conf and docs which you check out with code/test.git or conf/test.git or docs/test.git. I thought this might be the problem and copied the repos directly into /var/lib/gitosis/repositories dir but they still did not display. Please can anyone point me at anything I can try to get this working. Been at it for days.

+1  A: 

Since these repositories are actually inside your home directory, it may be a matter of permissions. Maybe your home is chmodded not to be readable by "others"?

Are the permissions for those repositories' directories (in your home, not the symlinks) wide enough to allow the webserver to see them? For the webserver to see your repositories, the full path to the repository and the repositories themselves bust be able to be read by the webserver, and the directories need to be r+x by the webserver.

Use some ls -la to see the permissions, and chmod using good judgement.

Or, probably better... just move the repositories somewhere else like /opt or /gitrepo, and set the permissions correctly there. I am suggesting this as there are good reasons why your home should not be world-readable.

mfontani
I had tried permissions all the way up to 777 just to see if that was the problem. Also tried to move the repos completely into the /var/lib/gitosis directory. But nothing seems to work. I've been at it for a few days now and I'll try again to move the dirs.
pn1 dude
You need to ensure that wherever you put these repos, both all the directories leading to the repos _and_ the repos' files themselves are readable by the webserver user, and (if it exists) the user that runs gitweb.
mfontani
OK I moved the whole gitosis home and repository to /opt/gitosis and got the gitois and git ssh working. Then I changed the config files for gitweb (/etc/gitweb.conf) and cgitrc (/etc/cgitrc) to point to the new repos. Restarted httpd. Now my repos show up. Whohoo.
pn1 dude