快速搭建 Git 服务器[Windows版]

服务器搭建

下载

解压

解压缩下载的压缩包即可,无需安装。
图片.png

创建本地存储文件夹

图片.png

配置

打开data文件夹下的gitblit.properties
在第17行可以看到

include = defaults.properties

同文件夹下找到defaults.properties
将上边配置的本地存储文件夹的路径复制过来

#git.repositoriesFolder = ${baseFolder}/git
git.repositoriesFolder = E:\GitBlit\Repository

找到server.httpPort,设定http协议的端口号

# 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
server.httpPort = 1024

找到server.httpBindInterface,设定服务器的IP地址。这里就设定你的服务器IP。

# 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
server.httpBindInterface = localhost

找到server.httpsBindInterface,设定为localhost

# 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
server.httpsBindInterface = localhost

运行

运行gitblit.cmd
图片.png
如上图则运行成功
在浏览器中打开,现在就可以使用GitBlit了。默认用户名密码都是 admin
图片.png

个人博客
腾讯云社区
掘金
CSDN
简书
GitHub
码云
OSCHINA
Segmentfault
公众号:wx.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值