1. Environmental requirements
You need to follow jdk1.8 first, and configure the environment variable
gitblit download: http://www.gitblit.com/
2. Install gitblit
Download and unzip:
Create a code warehouse folder
Find .../data/gitblit.properties, add configuration:
#存储项目代码的文件夹路径
git.repositoriesFolder=E:\install\gitblit-1.9.3\projectcode
#http协议的端口号,唯一且未被占用的端口号
server.httpPort=5544
#设定服务器的IP地址
server.httpBindInterface=192.12.1.1
3. Start by command line
Double-click to start: gitblit.cmd
starts successfully
Open the browser, enter ip+configured port to access
the default administrator account password: admin/admin
4. Install as a service and start automatically at boot
Edit.../gitblit-1.9.3/installService.cmd
1.SET ARCH=amd64 (for 64-bit) or SET ARCH=x86 (for 32-bit)
2. Set startup parameters to empty --StartParams="" ^
After saving, Right-click installService.cmd to run as administrator. Then win+r enter services.msc to enter the service list, find gitblit right click to start,默认开机自启
5. After installing as a service, start an error
Error message:
[2023-08-09 20:48:43] [error] Failed creating java
[2023-08-09 20:48:43] [error] ServiceStart returned 1
[2023-08-09 20:48:43] [info] Run service finished.
solution:
- Check whether the number of digits of SET ARCH is consistent with that of your computer
- Right-click gitblitw.exe to run as an administrator, remove the Use default check, then select the jvm.dll file under your own jdk, click Apply to
delete the original service, run cmd as an administrator, and enter sc delete gitblit to remove the service name , and then reinstall the service