blob: d781aeafb7ea3fce0a308323845a9d737ad14802 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#
#
# Git Smart HTTP Support (authenticated read/write)
# git push, clone, fetch — ALL authenticated
SetEnv GIT_PROJECT_ROOT /srv/git
SetEnv GIT_HTTP_EXPORT_ALL 1
# Expose all of the endpoints.
ScriptAliasMatch "^(/.+/(git-upload-pack|git-receive-pack|info/refs))$" \
/usr/libexec/git-core/git-http-backend$1
# Globally authenticate for each endpoint.
<LocationMatch "^/.+/(git-upload-pack|git-receive-pack|info/refs)$">
AuthType Basic
AuthName "Git Access"
AuthUserFile ${GIT_HTTP_AUTH_FILE}
Require valid-user
</LocationMatch>
# info/refs strictly scoped
<LocationMatch "^/.+/info/refs$">
<RequireAny>
Require expr %{QUERY_STRING} == "service=git-upload-pack"
Require expr %{QUERY_STRING} == "service=git-receive-pack"
</RequireAny>
</LocationMatch>
|