在本地搭建代码仓库gitlit

首先下载文件http://gitblit.github.io/gitblit/

这里我是下载的window版本

然后解压

找到data目录,修改defaults.properties文件。

需要修改这四行代码

1
2
3
4
2070行 server.httpPort = 8080
2078行 server.httpsPort = 8443
2097行 server.httpBindInterface = localhost
2106行 server.httpsBindInterface = localhost

然后回到目录启动gitblit.cmd即可。

之后在浏览器打开http://localhost:8080/即可访问。

默认用户为admin admin

之后创建仓库使用即可。