【发布时间】:2019-02-17 15:10:26
【问题描述】:
我在 centOS 7 的 ssh 和 http 模式下运行 Gitolite。我照原样按照 this 教程进行操作。
我的问题是我可以通过 ssh 克隆所有 repo,但即使在向所有添加 R = daemon 访问规则后也只能通过 http 克隆 testing.git repo我想通过 http 提供的存储库。
gitolite.conf 看起来像这样:
cat gitolite.conf
repo gitolite-admin
RW+ = Git-Admin
repo testing
RW+ = @all
repo avengers
RW+ = Git-Admin
repo @all
R = daemon gitweb
ssh git@192.168.15.2 信息
hello Git-Admin, this is git@osboxes running gitolite3 v3.6.9-0-g144d8a2 on git 1.8.3.1
R W avengers
R W gitolite-admin
R W testing
卷曲http://admin:admin@192.168.15.2/git/info
hello admin, this is httpd@osboxes running gitolite3 v3.6.9-0-g144d8a2 on git 1.8.3.1
R W testing
我不知道哪里出错了。
提前致谢
[root@osboxes repositories]# vim /var/www/bin/gitolite-suexec-wrapper.sh
#!/bin/bash
#
#Suexec wrapper for gitolite-shell
#
export GIT_PROJECT_ROOT="/home/git/repositories"
export GITOLITE_HTTP_HOME="/home/git"
exec ${GITOLITE_HTTP_HOME}/gitolite/src/gitolite-shell
[root@osboxes 存储库]# cat /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
# You can comment out the below 3 lines and put correct value as per your server information
# ServerName gitserver.example.com
# ServerAlias gitserver
ServerAdmin youremailid@example.com
DocumentRoot /var/www/git
<Directory /var/www/git>
Options None
AllowOverride none
Order allow,deny
Allow from all
</Directory>
SuexecUserGroup git git
ScriptAlias /git/ /var/www/bin/gitolite-suexec-wrapper.sh/
ScriptAlias /gitmob/ /var/www/bin/gitolite-suexec-wrapper.sh/
#ScriptAlias /git/ /home/git/gitolite/src/gitolite-shell
#ScriptAlias /gitmob/ /home/git/gitolite/src/gitolite-shell
<Location /git>
AuthType Basic
AuthName "Git Access"
Require valid-user
AuthUserFile /etc/httpd/conf/git.passwd
</Location>
</VirtualHost>
【问题讨论】:
标签: linux git apache github gitolite