I. Installing Java
Download address: http://www.java.com/zh_CN/
Just install it directly.
Configuring Java environment variables
Right-click "Computer"=> "Property"=> "Advanced System Settings"=> "Advanced"=> "Environment Variables"=> "System Variables".
1, new
Variable name: JAVA_HOME
Variable value: C: Program Files Java jre1.8.0_144 [depending on your own installation path, mine is installed on C disk]
2, new
Variable name: CLASSPATH
Variable values:% JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar
3, add
Find the PATH variable and select Edit. Add% JAVA_HOME%/bin;%JAVA_HOME%/jre/bin to the end of the variable value.
3. Building Gitblit Server
1. Download address: http://gitblit.com/
2. Decompress and download the compressed package, without installation.
3. Create a directory to store the code base E: git gitdata
4. Modify gitblit. properties E: git gitblit-1.8.0 data gitblit. properties under the data directory.
Add the following code to copy defaults.properties from the same directory
# Base folder for repositories.
# This folder may contain bare and non-bare repositories but Gitblit will only
# allow you to push to bare repositories.
# Use forward slashes even on Windows!!
# e.g. c:/gitrepos
#
# SINCE 0.5.0
# RESTART REQUIRED
# BASEFOLDER
# Directory of stored code created above
git.repositoriesFolder = E:\git\gitdata
# Standard http port to serve. <= 0 disables this connector.
# On Unix/Linux systems, ports < 1024 require root permissions.
# Recommended value: 80 or 8080
#
# SINCE 0.5.0
# RESTART REQUIRED
# Set the port of access, do not conflict with other ports
server.httpPort = 1000
# Secure/SSL https port to serve. <= 0 disables this connector.
# On Unix/Linux systems, ports < 1024 require root permissions.
# Recommended value: 443 or 8443
#
# SINCE 0.5.0
# RESTART REQUIRED
server.httpsPort = 1001
# Specify the interface for Jetty to bind the standard connector.
# You may specify an ip or an empty value to bind to all interfaces.
# Specifying localhost will result in Gitblit ONLY listening to requests to
# localhost.
#
# SINCE 0.5.0
# RESTART REQUIRED
# Setting up IP of Server
server.httpBindInterface =192.168.1.109
# Specify the interface for Jetty to bind the secure connector.
# You may specify an ip or an empty value to bind to all interfaces.
# Specifying localhost will result in Gitblit ONLY listening to requests to
# localhost.
#
# SINCE 0.5.0
# RESTART REQUIRED
# localhost is fine.
server.httpsBindInterface =localhost
5. Modify installService.cmd E: git gitblit-1.8.0 data installService.cmd
@REM arch = x86, amd64, or ia32
SET ARCH=x86
The computer that builds the server is a 32-bit selection x86 64-bit selection amd64
6. Installing windows Services
7. Check windows Services
Make sure that every windows boot starts automatically for automatic mode
Right-click gitblit and start the service
Note: If you want to delete a service, run uninstallService.cmd directly under D: open_source gitblit-1.7.1
8. Set up firewall rules to ensure that other machines in LAN can access them.
8. Input in browser http://192.168.1.109:1000
Server IP: Port
IV. Configuring Gitblit Users
1. Access System http://192.168.1.109:1000
2. Login with Administrator's Account
User name and password are admin
3. Adding Users
Create users for developers on your team, and only authorized users can do that.
The user name and initial password are then sent to the team members to log in. http://192.168.1.109:1000 Go in and change the password
4. Creating Project Groups