无法通过 Apache 向远程客户端提供 Git 存储库

无法通过 Apache 向远程客户端提供 Git 存储库

我在 Debian 服务器上有 X 个 Git 存储库,并希望通过 Apache 提供它们。我还想将 Redmine 身份验证与存储库结合使用,但如果我可以访问存储库,那就更好了。

<VirtualHost *:443>
        ServerName 192.168.1.2 (not the real ip
       # ServerAlias git
        ServerAdmin [email protected]

        PassengerEnabled off
        PassengerHighPerformance off

SetEnv GIT_PROJECT_ROOT /var/lib/git/
SetEnv GIT_HTTP_EXPORT_ALL

ScriptAlias /git/ /usr/lib/git-core/git-http-backend/

# Das Remine Perl Authentification muss in den Perl lib Baum gesymlinked sein
        # PerlLoadModule  Authen::Simple::LDAP
        PerlLoadModule  Apache::Redmine
        PerlLoadModule  IO::Socket::SSL
        <Location />
#                DAV svn
#                LimitXMLRequestBody 0
#                SVNParentPath "/var/lib/svn
                Order deny,allow
                Deny from all
                Satisfy any
                #     Browsen geht leider nicht
                #     SVNListParentPath On
#                SVNPathAuthz off
                PerlAccessHandler Apache::Authn::Redmine::access_handler
                PerlAuthenHandler Apache::Authn::Redmine::authen_handler
                AuthType Basic
        Require valid-user
                AuthName "Git Repository"
                AuthUserFile /dev/null

                <Limit GET PROPFIND OPTIONS REPORT>
                        Require valid-user
                        Allow from 192.168.1.2
                        Allow from 127.0.0.1
                       Satisfy any
                </Limit>
                # write
                <LimitExcept GET PROPFIND OPTIONS REPORT>
                        Require valid-user
                </LimitExcept>
                RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"
                RedmineDbUser "redmine"
                RedmineDbPass "xxxxxxxxxxxxxx"
#               RedmineCacheCredsMax 100
        RedmineGitSmartHttp yes
        </Location>

Git 存储库位于 /var/lib/git 下。但无论我如何更改此配置,我总是处于“未找到存储库”和“错误 500”之间。日志文件没有为我提供有用的信息。有人有想法吗?

(操作系统是 Debian 7.9)

编辑2:

我无法使系统的身份验证正常工作,它甚至没有询问我密码或用户名:

这是迄今为止的配置,有人能告诉我我做错了什么吗?

<VirtualHost *:443>


LoadModule dav_fs_module modules/mod_dav_fs.so

DocumentRoot /var/lib/git
ServerName gittest

PerlLoadModule Apache::Redmine

SetEnv GIT_PROJECT_ROOT /var/lib/git
####SetEnv GIT_HTTP_EXPORT_ALL

  ErrorLog /var/log/apache2/git-error.log
  CustomLog /var/log/apache2/git-access.log combined


 ScriptAlias / /usr/lib/git-core/git-http-backend/
<Location "/var/lib/git/">
    DAV on
    AuthType Basic
    AuthName "GM Git Repositories"
    Require valid-user

    PerlAccessHandler Apache::Authn::Redmine::access_handler
    PerlAuthenHandler Apache::Authn::Redmine::authen_handler

  RedmineDSN "DBI:mysql:database=myredminedb;host=localhost"
  RedmineDbUser "redmine"
  RedmineDbPass "passwort"
 # RedmineGitSmartHttp yes


    SSLEngine on

    #   A self-signed (snakeoil) certificate can be created by installing
    #   the ssl-cert package. See
    #   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
    #   If both key and certificate are stored in the same file, only the
    #   SSLCertificateFile directive is needed.
    SSLCertificateFile    /etc/ssl/certs/apache.crt
    SSLCertificateKeyFile /etc/ssl/private/apache.key
....
</Location>

相关内容