windows 客户端在尝试使用 git-http-backend.exe 时被服务器配置拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12759854/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:57:24  来源:igfitidea点击:

Client denied by server configuration while trying to use git-http-backend.exe

windowsgitapache

提问by GorillaApe

I use apache 2.4

我使用 apache 2.4

Sat Oct 06 15:25:47.948789 2012] [authz_core:error] [pid 7580:tid 1232] [client 192.168.100.252:10153] AH01630: client denied by server configuration: C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe

Here is my configuration

这是我的配置

<Directory "C:\git-server">
Options +ExecCGI
Allow from all
</Directory>

 <VirtualHost *:80>
  DocumentRoot  "C:/git-server"
   ServerName ****
  DirectoryIndex index.php

SetEnv GIT_PROJECT_ROOT c:/git-server
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git/ "C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/"


<LocationMatch "^/.*/git-receive-pack$">
Options +ExecCGI
AuthType Basic
AuthName intranet
AuthUserFile "C:/git-server/config/users"
Require valid-user
</LocationMatch>

<LocationMatch "^/.*/git-upload-pack$">
Options +ExecCGI
AuthType Basic
AuthName intranet
AuthUserFile "C:/git-server/config/users"
Require valid-user
</LocationMatch>


</VirtualHost>

I am trying 2 days to setup git. i didnt expect that it was that difficult.

我正在尝试 2 天来设置 git。没想到这么难。

回答by emste

You should change your configuration to match the needs of Apache 2.4:

您应该更改配置以满足 Apache 2.4 的需求:

<Directory "C:\git-server">
Options +ExecCGI
Require all granted
</Directory>

Source: http://httpd.apache.org/docs/2.4/upgrading.html#access

来源:http: //httpd.apache.org/docs/2.4/upgrading.html#access