2

我正在尝试使用 ldap 身份验证将我的代码从客户端(git bash)推送到 git linux 服务器,但失败并出现以下错误

$ git push -u origin master
Counting objects: 5, done.
Writing objects: 100% (3/3), 279 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: RPC failed; result=22, HTTP code = 403
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

下面是我的虚拟主机条目

<VirtualHost <server ip>>
ServerName <server name>
LogLevel Debug
SetEnv GIT_PROJECT_ROOT /var/opt/git/repos
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git /usr/libexec/git-core/git-http-backend

<Directory "/usr/libexec/git-core*">
   Options ExecCGI Indexes
   Order allow,deny
   Allow from all
</Directory>
<LocationMatch "^/git/.*/git-receive-pack$">
        Order deny,allow
        Deny from All
        AuthName "GIT Repo"
        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative off
        AuthLDAPURL "ldaps://<servername>:501/ou=abc,dc=gd,dc=abcldap"
        Require valid-user
</LocationMatch>
</VirtualHost>

我在 apache 日志中看到以下错误

[error] [client 10.112.111.25] client denied by server configuration: /usr/libexec/git-core/git-http-backend

不知道出了什么问题。是ldap连接错误还是git错误。我的项目中只有 2 个文件。我能够克隆。您的帮助将不胜感激。

谢谢。

4

0 回答 0