我该如何配置gitweb和gitolite才能一起工作? [英] How do I have to configure gitweb and gitolite so they'll work together?
问题描述
我正在尝试使gitweb与gitolite一起工作......但迄今尚未成功。
我正在RedHat Linux机器上工作。存在一个名为 git
的用户。
gitolite安装在 / home / git
存储库位置: / home / git / repositories
请注意,gitweb与普通的香草git工作正常。现在我正在努力使它与gitolite一起工作。
以下是我的档案:
/etc/gitweb.conf
$ projectroot =/ home / git /库;
@git_base_url_list = qw(ssh:// [MyHostName] /home/git/projects.list);
$ projects_list =/home/git/projects.list
/home/git/projects.list
myrepo1.git
myrepo2.git
/home/git/.gitolite。 rc
:
$ PROJECTS_LIST = $ ENV {HOME}。 /projects.list;
$ GL_GITCONFIG_KEYS =gitweb.url receive.denyNonFastforwards receive.denyDeletes;
我错过了什么配置?
我没有对Apache做任何修改。
网址: http:// MyHostName / git
这给出了一个404错误 - - 没有找到存储库。
我最近设置了gitolite和gitweb,发现 /etc/gitweb.conf
非常需要 少许配置。你看起来对我来说很合适。 / home / git / repositories
的权限是多少?你可能会发现它们太严格了。试试看:
$ chmod -R 775 / home / git / repositories
这就是我解决这个问题的方法,(尽管我设想有一种更安全的方法来设置权限)。如果这样的话,我建议只是看看如何让Apache(或任何用户帐户gitweb正在执行)对存储库目录的更细粒度的权限。
我也在 .gitolite.rc
中有这个:
$ p $
GIT_CONFIG_KEYS => 'gitweb \。(owner | description | category)',
以下内容适用于< gitolite-admin> /conf/gitolite.conf
:
config gitweb.owner =所有者名称
配置gitweb.description =一些描述
配置gitweb.category =某些类别
I am trying to make gitweb work with gitolite... but unsuccessful so far.
I am working on a RedHat Linux machine. A user called git
exists.
gitolite is installed under: /home/git
Repository location: /home/git/repositories
Please note that, gitweb was working fine with plain vanilla git. Now i am trying to make it work with gitolite.
Here are what my files look like:
/etc/gitweb.conf
$projectroot = "/home/git/repositories"; @git_base_url_list = qw(ssh://[MyHostName]/home/git/projects.list); $projects_list = "/home/git/projects.list"
/home/git/projects.list
myrepo1.git myrepo2.git
/home/git/.gitolite.rc
:$PROJECTS_LIST = $ENV{HOME} . "/projects.list"; $GL_GITCONFIG_KEYS = "gitweb.url receive.denyNonFastforwards receive.denyDeletes";
What configuration have I missed? I have not made any changes to Apache.
Web URL: http://MyHostName/git
This gives a 404 error saying - No repositories found.
I recently set up gitolite and gitweb and found that /etc/gitweb.conf
required very little configuration. What you have looks right to me. What are the permissions like on /home/git/repositories
? You may find they are too restrictive. Try this out:
$ chmod -R 775 /home/git/repositories
That's what solved the issue for me, (though I imagine there's a more secure way to set up the permissions). If that works, I'd recommend just having a look into giving Apache (or whatever user account gitweb is being executed under) more fine-grained permissions over the repositories directory.
I also have this in my .gitolite.rc
:
GIT_CONFIG_KEYS => 'gitweb\.(owner|description|category)',
so that the following works in <gitolite-admin>/conf/gitolite.conf
:
config gitweb.owner = owner name
config gitweb.description = some description
config gitweb.category = some category
这篇关于我该如何配置gitweb和gitolite才能一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!