下载jdk 配置环境变量
。。。。省略
下载Gitblit
下载地址:http://www.gitblit.com/
windows服务器部署git仓库
解压缩下载的压缩包即可,无需安装
windows服务器部署git仓库
创建用于存储资料的文件夹
windows服务器部署git仓库
配置文件
找到Git目录下的data文件下的gitblit.properties文件,“记事本”打开
windows服务器部署git仓库
配置文件都在defaults.properties 打开defaults.properties
找到git.repositoriesFolder(资料库路径),赋值为建好的文件目录
windows服务器部署git仓库
找到server.httpPort,设定http协议的端口号
windows服务器部署git仓库
找到server.httpBindInterface,设定服务器的IP地址。这里就设定你的服务器内网IP
windows服务器部署git仓库
找到server.httpsBindInterface,设定为localhost
windows服务器部署git仓库
保存,关闭文件。
运行gitblit.cmd 批处理文件

以管理员进入cmd 运行gitblit.cmd
windows服务器部署git仓库
windows服务器部署git仓库
运行结果如上,运行成功。
在浏览器中打开,现在就可以使用GitBlit了
windows服务器部署git仓库
注册为 windows 服务
如果不想每次开机都运行gitblit.cmd,则可以将gitblit的启动注册到windows服务中,这样可以省去很多麻烦
打开installService.cmd
据图根据你的配置修改前两个地方
windows服务器部署git仓库
将第三个参数设置位 --StartParams="" ^

以管理员身份运行cmd 进入目录输入 installService.cmd
windows服务器部署git仓库
以管理员运行gitblitw.exe
windows服务器部署git仓库
点击上面的java 如图设置
windows服务器部署git仓库
点击应用 点击General的start
windows服务器部署git仓库
进入电脑服务
windows服务器部署git仓库
启动服务

相关文章: