Created
March 7, 2012 17:14
-
-
Save renier/1994444 to your computer and use it in GitHub Desktop.
Apache configuration snippet for enabling Git's smart http support (git-http-backend)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnv GIT_PROJECT_ROOT /var/www/git | |
SetEnv GIT_HTTP_EXPORT_ALL | |
# This next is needed to enable authenticated push | |
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER | |
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ | |
# Above, trailing slash needed to enable pull | |
<LocationMatch "^/git/.*/git-receive-pack$"> | |
Options +ExecCGI # Needed to enable push | |
AuthName "Protected" | |
AuthType basic | |
# ... etc. depending on the case | |
</LocationMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment