1.安装Java环境

2.下载Gitblit压缩包

http://gitblit.com/

3.解压后进行配置

编辑gitblit-1.8.0\data\gitblit.properties文件

git.repositoriesFolder = F:/GitServer    注意目录必须要用“/”而不是“\”。
server.httpPort = 8080
server.httpsPort = 8443

4.运行解压目录下的gitblit.cmd

5.在浏览器里进行管理

http://localhost:8080/

在浏览器中访问版本库的时候,复制的按钮需要Adobe Flash Player

6.导入证书

gitblit-1.8.0\data\certs\ca.cer

可以参考http://blog.csdn.net/xtayfjpk/article/details/45669335  此文章有关于如何生成用户证书以及服务器证书的细节

7.扩展:将GitBlit配置为Windows服务

Gitblit uses Apache Commons Daemon to install and configure its Windows service.

  1. Review the contents of the installService.cmd where you may have to change the default keystore password.
  2. Set the ARCH value as appropriate for your installed Java Virtual Machine.
  3. Add any necessary --StartParams as enumerated below in Command-Line Parameters.
  4. Execute the script.

After service installation you can use the gitblitw.exe utility to control and modify the runtime settings of the service.
Additional service definition options and runtime capabilities of gitblitw.exe (prunmgr.exe) are documented here.

涉及到的一个启动参数--StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^    只要修改一下密码就可以了

NOTE:
If you change the name of the service from gitblit you must also change the name of gitblitw.exe to match the new service name otherwise the connection between the service and the utility is lost, at least to double-click execution.

cmd文件中提到了Procrun

//IS Install service

Command-Line parameters override the values in gitblit.properties at runtime.

--baseFolder           The default base folder for all relative file reference settings
--repositoriesFolder   Git Repositories Folder
--userService          Authentication and Authorization Service (filename or fully qualified classname)
--httpPort             HTTP port for to serve. (port <= 0 will disable this connector)
--httpsPort            HTTPS port to serve.  (port <= 0 will disable this connector)
--sshPort              SSH Daemon port to serve.  (port <= 0 will disable this daemon)
--gitPort              Git Daemon port to serve.  (port <= 0 will disable this daemon)
--alias                Alias in keystore of SSL cert to use for https serving
--storePassword        Password for SSL (https) keystore.
--shutdownPort         Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)
--dailyLogFile         Redirect logging to a rolling, daily log file instead of stdout
--tempFolder           Folder for server to extract built-in webapp

Example

java -jar gitblit.jar --userService c:/myrealm.config --storePassword something --baseFolder c:/data

 

服务安装之后还需要另外设置

VM Considerations

By default, the service installation script configures your Windows service to use your default JVM. This setup usually defaults to a client VM.
If you have installed a JDK, you might consider using the gitblitw.exe utility to manually specify the server VM.

  1. Execute gitblitw.exe
  2. On the Java tab uncheck Use default.
  3. Manually navigate your filesystem and specify the server VM with the ... button
    Java Virtual Machine:C:\Program Files\Java\jre6\bin\server\jvm.dll

服务运行成功之后,假如通过https进行push的话,需要配置证书。

否则会提示fatal: unable to access url: SSL certificate problem: self signed certificate in certificate chain

有可能无法启动服务,可以查看日志gitblit-1.8.0\logs

[2017-05-19 17:29:14] [info] Commons Daemon procrun (1.0.10.0 64-bit) started
[2017-05-19 17:29:14] [error] Unable to open the Service Manager
[2017-05-19 17:29:14] [error] Access is denied.
[2017-05-19 17:29:14] [error] Commons Daemon procrun failed with exit value: 8 (Failed to install service)
[2017-05-19 17:29:14] [error] Access is denied.

http://stackoverflow.com/questions/13321132/apache-commons-daemon-procrun-access-is-denied-on-windows-7

Try running your command from a prompt with admin rights.

Right-click on the CMD.exe icon and select "Run as administrator" to start it that way.

用管理员权限打开cmd,然后进入installservice.cmd所在的目录。用命令行打开。【需要注意的是,必须使用这种方法来处理,右键管理员权限运行是不行的】

8.配置成可以使用Windows 域账号进行登录

realm.authenticationProviders = windows

9.配置邮件

http://gitblit.com/setup_hooks.html

10.push failed for branch (n/a (unpacker error))

git.checkReferencedObjectsAreReachable = false

配置汇总

git.repositoriesFolder = D:/GitServerRepository
server.httpPort = 8080
realm.authenticationProviders = windows
federation.allowProposals = true
git.checkReferencedObjectsAreReachable = false

=====================================================================

Gitblit介绍

What is Gitblit?

Gitblit is an open-source, pure Java stack for managing, viewing, and serving Git repositories.
It's designed primarily as a tool for small workgroups who want to host centralized repositories.

GO: Single-Stack Solution

Gitblit GO is an integrated, single-stack solution based on Jetty.

You do not need Apache httpd, Perl, Git, or Gitweb. Should you want to use some or all of those, you still can; Gitblit plays nice with the other kids on the block.

This is what you should download if you want to go from zero to Git in less than 5 mins.

WAR: For Your Servlet Container

Gitblit WAR is what you should download if you already have a servlet container available that you wish to use. Jetty 6/7/8 and Tomcat 6/7 are known to work. Generally, any Servlet 2.5 or Servlet 3.0 container should work.

You decide how to use Gitblit

Gitblit can be used as a dumb repository viewer with no administrative controls or user accounts.
Gitblit can be used as a complete Git stack for cloning, pushing, and repository access control.
Gitblit can be used without any other Git tooling (including actual Git) or it can cooperate with your established tools.

All Transports

The SSH, HTTP, & GIT protocols are supported and ready-to-go out of the box.

Issue tracking with branch-based pull requests

Gitblit blends elements of GitHub, BitBucket, and Gerrit to provide a streamlined collaboration workflow based on branches within the primary repository.

=============================

Tickets

http://gitblit.com/tickets_setup.html

=================================

Gitblit进行迁移的时候,需要同步用户设置,

git.repositoriesFolder = F:/GitServer
server.httpPort = 8080
server.httpsPort = 8443

Any important changes to the setting keys or default values will always be mentioned in the release log.

Gitblit v0.8.0 introduced a new default user service implementation which serializes and deserializes user objects into users.conf.

users.conf file will be automatically created from an existing users.properties file on the first launch after an upgrade.

To use the users.conf service,realm.userService=users.conf must be set.

This revised user service allows for more sophisticated Gitblit user objects and will facilitate the development of more advanced features without adding the complexity of an embedded SQL database.

users.properties and its user service implementation are deprecated as of v0.8.0.

users.properties会在服务器启动的时候,自动转换成users.conf

===============================

如何在windows中部署Gitblit的更多相关文章

  1. 如何在windows中编写R程序包(转载)

    网上有不少R包的编译过程介绍,挑选了一篇比较详细的,做了稍许修改后转载至此,与大家分享 如何在windows中编写R程序包 created by helixcn modified by binaryf ...

  2. 如何在Windows中打开多个Windows Media Player

    博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:如何在Windows中打开多个Windows Media Player.

  3. 如何在Windows中编译Linux Unix的代码(采用cygwin)?

    来源:http://www.cnblogs.com/rocky_yi/archive/2009/12/08/cygwin.html   作者:rocky_y 很多经典算法往往是用C++在linux下实 ...

  4. 如何在Windows中使用netsh命令进行端口转发

    自Windows XP开始,Windows中就内置网络端口转发的功能.任何传入到本地端口的TCP连接(IPv4或IPv6)都可以被重定向到另一个本地端口,或远程计算机上的端口,并且系统不需要有一个专门 ...

  5. 如何在Windows中安装GitHub

    1.使用Git 在Git官网下载Git安装包,双击开始安装即可.安装完毕之后,在Windows中会具有一个Git Bash命令行工具以及一个Git GUI客户端工具. 点击Download即可下载. ...

  6. Nexus安装及部署(含如何在Tomcat中部署)

    1. Nexus价值 1)方便-节约带宽-快 2)便于统一管理 3)持续集成需要 2.Nexus下载 http://www.sonatype.org/nexus/go 3.Nexus启动 解压后进入\ ...

  7. Centos或Windows中部署Zookeeper集群及其简单用法

    一.简介 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件.它是一个为分布式应用提供一致性服务的软件 ...

  8. 如何在Docker中部署DzzOffice

    一.一些背景 之前研究Docker很久了,并且在公司内部实际使用起来了,目前分两种场景使用Docker 1.作为PAAS,提供一致,统一的编译/测试环境: 2.作为虚拟机,直接分配给新来的开发人员使用 ...

  9. 【转】如何在 Windows 中执行干净启动

    完成故障排除后,请执行以下步骤将计算机重置为正常启动. Windows 8.1 和 Windows 8 从屏幕右边缘滑入,然后点按“搜索”.您也可以将鼠标指向屏幕的右下角,然后单击“搜索”. 在搜索框 ...

随机推荐

  1. 【url重写】

    一.原理void Application_BeginRequest(object sender, EventArgs e)    {  //url重写        HttpApplication a ...

  2. Java学习——基本数据类型

    Java两大数据类型 内置数据类型 引用数据类型 变量就是申请内存存储值,内存管理系统根据变量的类型分配相应的存储空间存储该类型的数据. 内置数据类型 8中基本类型(四个整数型,两个浮点型),一种字符 ...

  3. UIExtendedEdge

    在IOS7以后 ViewController 开始使用全屏布局的,而且是默认的行为通常涉及到布局.就离不开这个属性 edgesForExtendedLayout,它是一个类型为UIExtendedEd ...

  4. Android再学习-20141111-Android应用的七大件

    Android应用的七大件 应用程序的四大组件: Android的四大组件,使用时需要在程序中注册. Activity: Activity是应用程序的一个界面,可以通过这个界面查看联系人.打电话或者玩 ...

  5. [1] Tornado Todo Day0

    Github地址: day0 初始化数据库: jakeychen@JC:~/Public/tornado_todo$ pwd /home/jakeychen/Public/tornado_todo j ...

  6. Qt之图标切分与合并(关键是使用QPixmap的copy函数来拷贝整张图片的某个区域)

    有些时候会将多张有相同功能的图片绘制成一张,不管是使用或者绘制上都会方便很多.对美工与开发者来说也都是一件省事.省力.更省心的方式.二全其美,又何乐而不为呢... 例如:QQ等级           ...

  7. poj1547---结构数组

    题意:老师发给每个学生的橡皮泥相同,找出谁抢了谁的橡皮泥 思路:结构数组存储每个学生的橡皮总量,和名字 /* 结构数组存储用户信息--只放名称和体积 while输入循环复用长宽高变量 for循环求所有 ...

  8. RecyclerView 加入一个滑动控件bug处理 GridView只显示第一行

    如果RecyclerView 多样式布局,比如要加入一个展示多个图看的需求.自然想到用gridview给嵌套一下. 想法当然是可以的,但是发现,嵌套出来的效果是,gridview只显示一行. 想想原因 ...

  9. 基于nginx+xxl-job+springboot高可用分布式任务调度系统

    技术.原理讲解: <分布式任务调度平台XXL-JOB--源码解析一:项目介绍> <分布式任务调度平台XXL-JOB--源码解析二:基于docker搭建admin调度中心和execut ...

  10. 课程四(Convolutional Neural Networks),第四 周(Special applications: Face recognition &amp; Neural style transfer) —— 3.Programming assignments:Face Recognition for the Happy House

    Face Recognition for the Happy House Welcome to the first assignment of week 4! Here you will build ...