Last active
August 29, 2015 14:03
-
-
Save lessmost/8a51c40abfc9c9d32e0e to your computer and use it in GitHub Desktop.
set git server over apache httpd
This file contains 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
# Git over http setting | |
#Set this to the root folder containing your Git repositories. | |
SetEnv GIT_PROJECT_ROOT E:/GitRepos | |
# Set this to export all projects by default (by default, | |
# git will only publish those repositories that contain a | |
# file named “git-daemon-export-ok” | |
SetEnv GIT_HTTP_EXPORT_ALL | |
AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ E:/GitRepos/$1 | |
AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ E:/GitRepos/$1 | |
ScriptAliasMatch \ | |
"(?x)^/git/(.*/(HEAD | \ | |
info/refs | \ | |
objects/info/[^/]+ | \ | |
git-(upload|receive)-pack))$" \ | |
"C:/Git/libexec/git-core/git-http-backend.exe/$1" | |
<Directory "E:/GitRepos"> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order Allow,Deny | |
Allow from all | |
</Directory> | |
<LocationMatch "^/git/.*/git-receive-pack$"> | |
DAV on | |
AuthType Basic | |
AuthName "Git" | |
AuthUserFile "E:/wamp/passwd.git" | |
Require valid-user | |
</LocationMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment