看不到仓库 [英] Cannot see repositories

查看:107
本文介绍了看不到仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装了GitWeb和CGit,以试用到我的Git/Gitosis存储库的Web界面.在Fedora 13上运行时,我的Gitosis运行良好.我安装了gitweb和cgit并设置了配置以指向我的存储库,但是gitweb或cgi都不会列出存储库. Gitweb显示gitweb页面,但显示:

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-找不到项目

404 - No projects found

我的/etc/gitweb.conf文件中列出了正确的目录:

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显示cgit页面,但显示:

CGit shows the cgit page but shows:

不是git存储库: '/var/lib/gitosis/repositories/code/test.git'

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

当我单击此测试存储库链接时(是的,它存在).我有正确的目录 列在以下文件的/etc/cgitrc文件中:

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

因为两个都没有列出存储库,所以我认为它必须是我的配置,但是我似乎无法弄清楚要显示什么才能进行配置.我的存储库SymLinked位于/var/lib/gitosis/repositories中,它指向目录/home/git.我还在/var/lib/gitosis/repository下将我的存储库设置为代码,conf和docs,您可以使用code/test.git或conf/test.git或docs/test.git检出.我认为这可能是问题所在,因此将存储库直接复制到/var/lib/gitosis/repositories dir中,但它们仍然没有显示.请任何人指出我可以尝试执行的任何操作.呆了好几天了.

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"?

这些存储库目录的权限(在您的家中,而不是符号链接)是否足够宽以允许Web服务器查看它们?为了使Web服务器能够查看您的存储库,Web服务器可以读取该存储库的完整路径以及存储库本身,并且该目录必须由Web服务器r+x.

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.

使用一些ls -la查看权限,并使用chmod进行正确的判断.

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

或者,可能更好...将存储库移到其他位置,例如/opt/gitrepo,然后在此处正确设置权限.我建议这样做,因为有充分的理由使您的房屋不应该全世界可读.

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.

这篇关于看不到仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆