架设Git服务器

架设Git服务器项目html

经过比较发现须要CopSSH/Cygwin等环境的应用配置起来比较复杂,剩下的几个支持git smart http协议的web应用配置起来比较简单:java

  1. Bonobo Git Server
  2. WebGit.NET
  3. Git-Web-Access
  4. scm-manager
  5. Gitblit
  6. Gitalist

最后再根据更新/稳定等因素筛选出Bonobo Git Server、scm-manager、Gitblit,结果最终选择了scm-manager。git

配置scm-manager

在机器上安装java环境,从http://java.com/zh_CN/download/manual.jsp选择脱机版下载安装github

https://bitbucket.org/sdorra/scm-manager/wiki/download下载最新的scm-server-1.24-app.zipweb

安装为系统服务:windows

?
1
scm-server.bat install

而后在系统服务里设置为自动启动,而后启动服务就能够经过http://localhost:8080访问了,默认用户名和密码都是scmadmin。ruby

登进系统之后经过Repository Types修改Git中心库存放的路径。bash

修改默认的管理员用户名或者是其余的一些配置均可以找到%userprofile%\.scm\config目录下的相应xml配置文件来修改,注意要重启scm-server服务。服务器

更新:低版本操做系统如server 2003可能会在C:\Documents and Settings\Default User\.scm这样的目录下,而不是当前用户文件夹app

若是要启用邮件以及提醒,还须要安装插件scm-mail-plugin、 scm-notify-plugin,而后在设置中把Mail相关的SMTP设置填写好。

若是代码提交要跟Redmine关联,还须要安装插件scm-redmine-plugin,而后在项目信息里的Redmine选项卡配置Redmine地址为http://localhost:3000

若是要启用更新、自动关闭,还须要scm-manager和redmine使用一样的用户名密码,并且Redmine设置里必须启用REST API;

而后在提交的时候须要用git commit –m “(#问题ID) fix 修复内容”来关闭问题,能够用的关键字如fix,fixed等能够自行配置。

客户端安装

无论最终是使用那一种客户端(Git Extensions:http://code.google.com/p/gitextensions/或TortoiseGit:http://code.google.com/p/tortoisegit/),msysgit都是必须安装的:从http://msysgit.github.com/下载最新的Git-1.8.0-preview20121022.exe安装便可。

偏向使用命令行的只装msysgit就足够了;若是要使用图形界面能够选择msysgit自带的git gui,或者是另外安装git extensions或tortoisegit;我的感受git extensions的图形界面比较强大,若是安装它的话必定要安装上KDiff3。

更便捷的就是与Visual Studio集成了,Git Extensions安装的时候能够选择安装Visual Studio插件集成;另外还有一个工具能够进一步提高便捷性Git Source Control Provider:http://gitscc.codeplex.com/,它依赖于msysgit和git extensions,能够在官方网站下载安装或者在visual studio扩展管理里面搜索git进行安装。

Git配置

Git客户端安装好以后最好配置一个全局的用户名及邮箱:

?
1
2
git config --global user.name "Your Name Here"
git config --global user.email your_email@youremail.com

这个配置在新建Repository时可能会用到;另外能够经过一下命令来查看配置:

?
1
git config --list

Git相关资料

  1. Pro Git 中文版:http://git-scm.com/book/zh http://progit.org/book/zh/ 有墙,用google随便找一个PDF版直接下载
  2. Git Community Book 中文版:http://gitbook.liuhui998.com/index.html
  3. Git Magic:http://www-cs-students.stanford.edu/~blynn/gitmagic/intl/zh_cn/
  4. Git开发管理之道:http://blog.leezhong.com/translate/2010/10/30/a-successful-git-branch.html
  5. 如何高效利用GitHub:http://www.yangzhiping.com/tech/github.html
  6. 图解Git:http://marklodato.github.com/visual-git-guide/index-zh-cn.html
  7. 笔记《版本控制之道--使用Git》:http://www.nshen.net/sitelog/2011/08/03/git-note.html
  8. Git 故事连载:http://gitstory.wordpress.com/category/git/ Git Web Access做者写的(注意有墙)

另外还能够从Git Immersion一步一步演练:http://gitimmersion.com/lab_01.html

 

------EOF-----

相关文章
相关标签/搜索