【发布时间】:2013-10-07 23:23:55
【问题描述】:
我正在尝试使用 Gitolite + Gitweb,但遇到了一些问题..
我的conf/gitolite.conf如下
@dataset_repos = dat1 dat2
@closedsrc_repos = cod1 cod2
@opensrc_repos = testing
@admins = user1 user2
@bios = user1 user2 user3
@coders = user1 user3
repo gitolite-admin
RW+ = @admins
repo @opensrc_repos
RW+ = @all
repo @dataset_repos
RW+ = @admins @bios
repo @closedsrc_repos
RW+ = @admins @coders
当我第一次插入存储库code1和code2时,git告诉我:
remote: Initialized empty Git repository in /home/git/repositories/code1.git/
remote: Initialized empty Git repository in /home/git/repositories/code2.git/
我在 code2 上进行了初始提交,但没有出现。 所以我检查了权限,发现这些是:
drwxrwx--- 8 git git 4096 Oct 1 18:58 ./
drwxr-xr-x 8 git git 4096 Oct 1 19:08 ../
drwxrwx--- 8 git git 4096 Oct 1 19:08 gitolite-admin.git/
drwxrws--- 7 git git 4096 Oct 1 17:15 dat1.git/
drwx------ 7 git git 4096 Oct 1 18:58 code1.git/
drwx------ 7 git git 4096 Oct 1 18:58 code2.git/
drwxrwx--- 7 git git 4096 Sep 30 18:20 testing.git/
drwxrws--- 7 git git 4096 Oct 1 17:15 dat2.git/
所以我修复了 repo code1.git 和 code2.git 的权限:
# Fix ownership
sudo chown -R git:git *
# Fix directory permissions
sudo find <repo.git> -type d -exec chmod 770 {} \;
# Fix file permissions
sudo find <repo.git> -type f -exec chmod 660 {} \;
这两个 repos 出现在 gitweb 界面上。
但是,没有为这两个存储库中的每一个生成gl-conf。
现在,做一个提交,权限又搞砸了,repos 没有显示..
我做错了什么?
谢谢
【问题讨论】:
标签: git permissions repository gitolite gitweb