开发者

Cannot see repositories

开发者 https://www.devze.com 2023-01-22 05:09 出处:网络
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 r

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/c开发者_如何学运维gitrc 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.


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.


Just a note, the issue with the home directory is very likely due to SELinux being enabled. Try disabling in /etc/sysconfig/selinux.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号