【发布时间】:2014-08-17 03:37:01
【问题描述】:
我正在尝试使用 Apache 2.4 服务器在 windows server 2008 R2 上配置 Git 服务器。
我将此添加到 httpd.conf 文件中:
<Directory "C:/serveur_web">
Options +ExecCGI
Require all granted
</Directory>
<VirtualHost *:80>
SetEnv GIT_PROJECT_ROOT C:/serveur_web
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
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))$" \
"C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/$1"
</VirtualHost>
我在C:/serveur_web 中创建了一个存储库,我输入了这个命令用我的远程机器克隆它:
git clone http://dladev1/parc_auto
我收到了这个错误:
C:\Users\assontia>git clone http://localhost/parc_auto
Cloning into 'parc_auto'...
fatal: unable to access 'http://localhost/parc_auto/': The requested URL returne
d error: 403
在我的 apache error.log 中,我可以看到:
[Thu Jun 26 02:44:50.404296 2014] [authz_core:error] [pid 2852:tid 816] [client 10.52.66.78:60785] AH01630: client denied by server configuration: C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe
我想知道这是不是因为我没有匿名访问 git 服务器的权限?
是否需要自动创建用户才能使用 git 服务器?
这个问题不能帮助我解决我的问题:Question
【问题讨论】:
-
@cweiske,可能不是重复的,因为他有
Options +ExecCGI这是另一个问题的解决方案。
标签: git apache httpd.conf