Gitblit的安装配置及访问-windows
Git是现在很流行的分布式版本控制工具,github更是人人皆知。但是github要求能够访问互联网。遇到不能访问互联网的情况,难道只能望git兴叹了。还好开源软件给我们提供了选择,比如Gitblit、GitStack、Gitolite,其中GitStack貌似不能安装在windowsXP上。
最终考虑简单便捷,我选择Gitblit的Go分支做服务器——这个分支版本的好处就是什么都集成到一块了,不需要安装别的东西。关于Gitblit Go的安装配置文档也不少,但是自己在安装配置过程还是遇到了一些问题。
安装配置过程:
1. 下载Gitblit的Go分支并解压到本地就可以了,不需要安装。由于Gitblit是用Java开发的,所以记得先安装Java运行时。
2. 配置Gitblit目录下的\data\gitblit.properties文件,最基础的配置方式如下
git.repositoriesFolder= D:/gitRep
注意目录必须要用“/”而不是“\”。
server.httpPort = 8080
server.httpsPort=8443
- 配置http和https访问的接口,默认值是localhost,如果想要从其它电脑访问,赋空值就可以。
server.httpBindInterface=
server.httpsBindInterface=
3. 运行Gitblit目录下的gitblit.cmd就可以开启服务器了。
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.
将GitBlit配置为Windows服务
Gitblit uses Apache Commons Daemon to install and configure its Windows service.
- Review the contents of the installService.cmd where you may have to change the default keystore password.
- Set the ARCH value as appropriate for your installed Java Virtual Machine.
- Add any necessary --StartParams as enumerated below in Command-Line Parameters.
- 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.
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.
=============================
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.
A 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
=============================== |