我在centOS 7上的ssh和http模式下运行Gitolite。我按照原样使用了this教程。
我的问题是我能够通过ssh克隆所有repos但是只能在将R =守护程序访问规则添加到我想通过http提供的所有存储库之后,通过http克隆testing.git repo。
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 [email protected] info
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:[email protected]/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 repositories] #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 [email protected]
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>
检查您的Gitolite服务器上的/etc/httpd/conf/git.passwd
的内容。
如果它不包括admin/<encrypted password>
,它会将您认证为“匿名”,这意味着您只能访问来自@all
组的回购。