git服务器http配置
1,配置apache服务器(假定目录在gitFile)
2,终端执行
cd ~/local/gitFile        *定位至apache目录
 mkdir myproject.git            
 cd myproject.git
 git init --bare  *创建仓库
完成以上步骤可以在浏览器中访问http://localhost/~username/gitFile/Myproject.git/  
 可以查看到git的一些文件(head branches info等)
  
3,终端执行
 cd ~/local/gitFile/myproject.git
 mv hooks/post-update.sample hooks/post-update
 a+x hooks/post-update
 ./hooks/post-update  
 完成以上步骤可以在终端中测试git仓库是否创建成功
 终端执行git  clone  http://localhost/~username/gitFile/Myproject.git/     查看是否创建成功(一步步来肯定是成功的哈)
 4,此时git还不具备commit权限
 在  etc/extra/conf/httpd.conf 中取消#Include conf/extra/httpd-dav.conf 中的#
 在conf/extra/httpd-dav.conf中修改
 DavLockDB "/usr/var/DavLock"
 Alias /git "/usr/fileGit"
 Alias /uploads "/usr/uploads"
 <Directory "/usr/fileGit">
     Dav On
     Options +Indexes +FollowSymLinks
     AllowOverride None
     Order Allow,Deny
     Allow from all
     AuthType Basic
     AuthName "Git"
 AuthUserFile "user/user.git"
     Require valid-user
 </Directory>
 5,http配置完成了。