2

我目前正在尝试设置一个 git 存储库,以便通过 http 通过 apache 2.4 访问。

由于我无法理解的原因,我的客户总是会回应克隆或推送尝试

*URL*/git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

我已经将配置精简到最低限度,甚至摆脱了别名匹配:

<VirtualHost *:80>
Options +FollowSymlinks
SetEnv GIT_PROJECT_ROOT /opt/git/nocturne/
SetEnv GIT_HTTP_EXPORT_ALL=true
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
<Location "/git">
       Options +ExecCGI
       AuthName "Git repository, use ldap credentials"
       AuthLDAPURL "ldap://127.0.0.1:389/ou=People,dc=domain,dc=stuff?uid?sub?(objectClass=simpleSecurityObject)"
       AuthType Basic
       AuthName "Git"
       AuthBasicProvider ldap
       AuthLDAPGroupAttribute member
       AuthLDAPGroupAttributeIsDN Off
       require valid-user
       require ldap-group cn=git-user,ou=Groups,dc=domain,dc=stuff
</Location>
</VirtualHost>

存储库本身已被初始化git init --bare并被符号链接到 /var/www/git 。

我要你告诉我,我错过了什么明显的东西。我已经运行了 git-update-server-info,并且存储库可由 www 用户读写。

先感谢您

4

1 回答 1

0

我注意到配置文件中的“SetEnv GIT_HTTP_EXPORT_ALL=true”行不应该有等号(“=”)。该等号可能会导致 Apache 设置错误的环境变量名称。

于 2015-04-06T22:08:19.680 回答