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
| 1,intsall xampp 2,add & //git.conf <VirtualHost *:80> SetEnv GIT_PROJECT_ROOT /home/leo/git/ SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias / /usr/libexec/git-core/git-http-backend/ <Location "/"> DAV on Order allow,deny Allow from all AuthType Basic AuthName "Git" AuthUserFile /path/to/apache/conf/vhost/git.passwd Require valid-user </Location> </VirtualHost> 3,create user and password for http access /path/to/apache/bin/htpasswd -c git.passwd leo 4,create a simple git repo mkdir -p /home/leo/git/leo_git_test cd /home/leo/git/leo_git_test git init --bare git update-server-info 5,restart apache in xampp 6, test git git clone http://local/path/leo_git_test
|