HTTP / APACHE下的私有GIT存储库

时间:2014-11-21 07:01:43

标签: git apache http

我只想使用apache通过http进行私有重用。但是当我执行git PULL时,我无法强制要求服务器询问用户/密码。我推送时只询问用户/通行证。

重新定位在 c:/htdocs/git/test.git

我的 httpd.conf:

<Directory />
    #AllowOverride none
    #Require all denied
</Directory>

SetEnv GIT_PROJECT_ROOT G:/htdocs/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER 

ScriptAlias /git/ "C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/"

<Directory "C:/Program Files (x86)/Git/libexec/git-core/">
        AllowOverride None
        Options +ExecCGI 
        Order allow,deny
        Allow from all
</Directory>

ScriptAliasMatch \
        "(?x)^/(.*/(HEAD | \
                    info/refs | \
                    objects/(info/[^/]+ | \
                             [0-9a-f]{2}/[0-9a-f]{38} | \
                             pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
                    git-(upload|receive)-pack))$" \
    "C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/$1"

<LocationMatch "^/.*/git-receive-pack$">
    Options +ExecCGI
    AuthType Basic
    AuthName "Git"
    AuthUserFile "G:/gitSecurity/password.git"
    Require valid-user
</LocationMatch>

我失踪了什么?

谢谢!

0 个答案:

没有答案