GIT 安装总结

GIT 版本 Git-1.7.8-preview20111206.exe

apache 版本 httpd-2.0.64-win32-x86-no_ssl.msi


apache config/httpd.conf

最后添加如下配置信息,文件路径按照实际情况填写,D:/Users/Tommy/git为版本库     C:/Git/libexec/git-core/为git路径


SetEnv GIT_PROJECT_ROOT D:/Users/Tommy/git
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ "C:/Git/libexec/git-core/git-http-backend.exe/"


<Directory "C:/Git/libexec/git-core/">
  Allow From All
</Directory>
 


<Directory "D:/Users/Tommy/git">
  Allow From All
</Directory>


<Location /git/work>  
    AuthType Basic  
    AuthName "Git Access"  
    AuthUserFile D:/Users/Tommy/htpasswd
    Require valid-user  
</Location> 



为了能使得http可以push到服务器,需要在版本库下的config文件最后添加下面两句话


[http]
  receivepack = true

你可能感兴趣的:(GIT 安装总结)