【发布时间】:2014-10-02 18:23:03
【问题描述】:
我目前正在尝试设置一个 git 存储库,以便通过 apache 2.4 通过 http 访问。
由于我无法理解的原因,我的客户总是会使用
响应克隆或推送尝试*URL*/git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?
我已经将配置精简到最低限度,甚至去掉了 Aliasmatches:
<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 用户可读可写的。
提前谢谢你
【问题讨论】:
-
愚蠢的httlp?这不傻,这很聪明http:stackoverflow.com/a/5265022/6309。如stackoverflow.com/a/24167097/6309
-
感谢您指出我的误解。我已经更正了这个问题。
-
您是否查看了stackoverflow.com/a/3982493/6309 的示例?您是否像stackoverflow.com/a/24217525/6309 那样设置了REMOTE_USER?您是否尝试过
Directory而不是Location? (如github.com/VonC/compileEverything/blob/…)