git instaweb 给出 403 Forbidden - 未找到项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/112613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git instaweb gives 403 Forbidden - No projects found
提问by jes5199
running git instawebin my repository opens a page that says "403 Forbidden - No projects found". What am I missing?
git instaweb在我的存储库中运行会打开一个页面,上面写着“403 Forbidden - No projects found”。我错过了什么?
回答by jes5199
looks like the debian install of git sets $projectrootglobally in a way that confuses instaweb. I removed the $projectrootline from /etc/gitweb.confand the error went away.
看起来像 git 的 debian 安装在$projectroot全局范围内以一种混淆instaweb. 我删除了该$projectroot行,/etc/gitweb.conf错误就消失了。
回答by Peter Turner
I don't know Git about Git, but you're probably missing the ability to execute on the directory in question, chmod +Xit.
我不了解关于 Git 的 Git,但是您可能缺少在相关目录上执行 chmod +X 的能力。
回答by Peter Turner
check the git-web cgi (the perl), see the directory of the projectroot is same as your currect setting. there are some settings that not in gitweb.conf
检查 git-web cgi(perl),看到 projectroot 的目录与您当前的设置相同。有一些设置不在 gitweb.conf 中
回答by klang
Two years later ..
两年后..
I fixed this problem by stating the projectroot in gitweb.cgi (it's the only value that seems to matter)
我通过在 gitweb.cgi 中声明 projectroot 解决了这个问题(这是唯一重要的值)
回答by Kylo
And another year later ...
又一年后...
I fixed this problem (F12, git 1.7.2.3) by:
我通过以下方式解决了这个问题(F12,git 1.7.2.3):
vi .git/gitweb/gitweb.cgi # set DocumentRoot to <root>/.git/gitweb.cgi
GITWEB_CONFIG=.git/gitweb lighttpd -f .git/gitweb/httpd.conf
I didn't dig further to figure out why I needed to do this ...
我没有进一步挖掘以弄清楚为什么我需要这样做......
回答by Feng Wang
two year later ...
两年后...
I fixed this problem by adding this line
我通过添加这一行解决了这个问题
Options All ExecCGI FollowSymLinks Includes Indexes
to my httpd.conf file
到我的 httpd.conf 文件

