【问题标题】:Trying to setup git-http-backend on apache 2.4尝试在 apache 2.4 上设置 git-http-backend
【发布时间】: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 用户可读可写的。

提前谢谢你

【问题讨论】:

标签: git apache apache2.4


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2017-04-16
    • 2023-03-30
    • 2016-03-27
    • 2018-09-30
    • 2023-04-02
    • 2018-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多