我正在尝试在OSX上创建一个Git存储库服务器。我必须使用HTTP协议,但我希望能够在Git中使用钩子。因此,我唯一的选择是制作智能HTTP。我正在尝试使用本教程作为我的主干来生成有效的配置:http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html
我当前的配置文件如下所示:
<VirtualHost *:80>
ServerName ciserver.smt
DocumentRoot /Library/WebServer/Documents/CI
SetEnv GIT_PROJECT_ROOT /Library/WebServer/Documents/CI
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias / /usr/libexec/git-core/git-http-backend/
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /Library/WebServer/Documents/CI/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /Library/WebServer/Documents/CI/$1
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
/usr/libexec/git-core/git-http-backend/$1
<LocationMatch "^/.*/git-receive-pack$">
AuthType Basic
AuthName "Git"
AuthUserFile /etc/apache2/other/htpasswd-git
AuthGroupFile /etc/apache2/other/htgroup-git
Require valid-user
</LocationMatch>
</VirtualHost>
我正在使用OSX(Lion)。 当我尝试执行此命令时:
git clone http://username@ciserver.smt/ci_test.git
我得到了:
error: The requested URL returned error: 403 while accessing http://marcin.zyga@ciserver.smt/ci_test.git/info/refs
fatal: HTTP request failed
我在这里做错了什么?