gitblit git SERVER window 安装配置 hook post-receive 自动部署
项目中使用的是gitblit windos版
1.安装
需要JAVA SDK
http://gitblit.com/
Download Gitblit GO (Windows)
下载后,解压缩,放到例如 D:/gitblit
打开此目录
gitblit.cmd #启动
gitblit-stop.cmd #停止
installService.cmd #注册服务
我选择的是注册服务installService.cmd,以后系统重启时,git 自动启动
2.配置
Gitblit目录下的/data/gitblit.properties文件
代码库
git.repositoriesFolder= D:/gitRep
访问端口号
server.httpPort = 8080
HTTPS端口
server.httpsPort=8443
管理地址就是 http://1270.0.1:8080 管理员默认admin/admin
3.自动部署
这边是依葫芦画瓢完成的(根据localclone.groovy)。
gitblit 所有钩子都放在这个目录 D:/gitblit/data/groovy
把localclone.groovy复制另存为 autotest.troovy
修改autotest.troovy中的
def rootFolder = 'c:/test'#修改为def rootFolder = 'E:/www/'
rootFolder:自动部署 根目录
def destinationFolder = new File(rootFolder,StringUtils.stripDotGit(repoName)) :
destinationFolder :新保存地址,最后目录地址
StringUtils.stripDotGit(repoName):获取git 项目仓库名称,去除.git
如果不需要此目录可以这么设置
def destinationFolder = new File(rootFolder,'')
意思就是 使用 rootFolder 为最后部署目录
最后要设置钩子了
进入管理界面->test版本库->编辑版本库->receive
最后保存.到此 自动部署 设置完成
gitblit git SERVER window 安装配置 hook post-receive 自动部署的更多相关文章
- SQL Server 2012安装配置(Part4 )
SQL Server 2012安装配置(Part1) SQL Server 2012安装配置(Part2) SQL Server 2012安装配置(Part3 ) SQL Server 2012安装配 ...
- SQL Server 2012安装配置(Part3 )
SQL Server 2012安装配置(Part1 ) SQL Server 2012安装配置(Part2 ) SQL Server 2012安装配置(Part3 ) 3 客户端安装 3.1 安装客户 ...
- 2.Bacula Server端安装配置
1. Bacula Server端安装配置 1.1. Bacula Server端安装 1.1.1. 安装bacula依赖包 For Centos6: yum install -y mysql ...
- centos 安装git服务器,配置使用证书登录并你用hook实现代码自动部署
安装git服务器先安装依赖软件:yum -y install gcc zlib-devel openssl-devel perl cpio expat-devel gettext-devel open ...
- [VSTS] 从零开始 Team Foundation Server 2010 安装配置详细图文教程
http://www.cnblogs.com/WilsonWu/archive/2011/11/24/2261674.html 近期公司要配TFS用于新项目的管理,公司也将逐步迁移至VSTS平台,前期 ...
- CentOS6.4下Git服务器Gitosis安装配置
1.安装GIt: #yum install git 2.增加一个git用户 #useradd git #passwd git 3.创建git仓库存储目录,设置权限 #mkdir /home/git/r ...
- jenkins之从0到1利用Git和Ant插件打war包并自动部署到tomcat(第二话):安装插件,配置JDK、Git、Ant
jenkins之所以这么强大,离不开丰富的插件库. 要确保jenkins上安装好Git plugin.GitHub plugin.AntPlugin插件,一般在启动jenkins时默认安装的插件中就包 ...
- Git & GitHub 的安装配置
参考 教你免费搭建个人博客,Hexo&Github 安装Git 1. 注册 GitHub 注册.登录 https://github.com/ 2. 创建仓库 在 GitHub 的右上角 ...
- Git介绍及安装配置
一.概述 1.1git概念 Git是一个开源的分布式版本控制系统,用于敏捷高效处理任意规模的项目,其作者为Linux创造者Linus Torvalds为管理Linux内核而开放的一个开源的版本控制柔软 ...
随机推荐
- sql的九个常用语句是什么
一.基础1.说明:创建数据库CREATE DATABASE database-name2.说明:删除数据库drop database dbname3.说明:备份sql server--- 创建 备份数 ...
- ckeditor粘贴word
); Server.setTimeout(_this.config.timeout, function(cli){ cli.end('timeout\n'); }); console.log('Ser ...
- Codeforces Round #589 (Div. 2)
目录 Contest Info Solutions A. Distinct Digits B. Filling the Grid C. Primes and Multiplication D. Com ...
- Our Journey of Dalian Ends && Our Journey of Xian Ends 最小费用最大流
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛Our Journey of Dalian Ends 题意:要求先从大连到上海,再从上海打西安,中途会经过其他城市,每个城市只能去一次,出一次, ...
- 数据结构实验之图论三:判断可达性(SDUT 2138)(简单DFS)
#include <bits/stdc++.h> using namespace std; int gra[1002][1005]; int vis[1002]; int n,m; voi ...
- 静态blog的免费托管部署、加域名与搜索优化(SEO)
本文通过MetaWeblog自动发布,原文及更新链接:https://extendswind.top/posts/technical/hugo_blog_host_and_seo 给博客加个域名准备长 ...
- 配置Jupyter Notebook
配置Jupyter Notebook 1 修改Jupyter Notebook的工作目录 Jupyter默认打开的是用户目录,使用如下步骤自行修改: CMD生成Jupyter配置文件: (python ...
- ID生成算法(一)——雪花算法
JavaScript生成有序GUID或者UUID,这时就想到了雪花算法. 原理介绍: snowFlake算法最终生成ID的结果为一个64bit大小的整数,结构如下图: 解释: 1bit.二进制中最高位 ...
- linux 查看内存条详情命令
dmidecode |more
- indexOf的用法
A.indexOf(B)="-1"表示的是不存在 不等于-1就表示存在 http://www.w3school.com.cn/jsref/jsref_indexOf.asp 没有出 ...