1. 准备 1.1 安装jdk 略 1.2下载:gitblit 1.8.0 下载后解压至无空格目录中。
2. 配置gitbilit 2.1 配置/data/gitblit.properties ,不需修改default.properties . 如下:
#
# Define your overrides or custom settings below
#
#Git库的文件夹
git.repositoriesFolder = D:\GIT_Repositories
#http协议和https 协议的端口
server.httpPort = 10101
server.httpsPort = 10102
#服务器端访问的网址
server.httpBindInterface =192.168.2.103
server.httpsBindInterface =192.168.2.103
2.2 启动gitblit.cmd 。访问http://192.168.2.103:10101/ 。可用admin/admin登录(配置在/data/user.conf文件中)。
3. 添加服务 3.1 编辑installService.cmd 增加Set CD=gitblit安装目录
32位系统:SET ARCH=x86 64位系统:SET ARCH=amd64
@REM arch = x86, amd64, or ia32
SET ARCH=amd64
_Set CD=D:\program\gitblit-1.8.0_
启动服务。