#
#
# 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.
AuthType Basic
AuthName "Git Access"
AuthUserFile ${GIT_HTTP_AUTH_FILE}
Require valid-user
# info/refs strictly scoped
Require expr %{QUERY_STRING} == "service=git-upload-pack"
Require expr %{QUERY_STRING} == "service=git-receive-pack"