Gitblit服务器搭建【基于windown系统】

一: Gitblit 服务器搭建

1:前置准备

安装jdk并配置环境变量–此步跳过

2:下载gitblit

Step1: 去官网下载 http://www.gitblit.com/ 下载gitblit安装包

Gitblit服务器搭建【基于windown系统】

Step2:安装gitblit

1:创建一个目录用来存放代码库 比如:E:\zhylbGitProject
2:修改解压gitblit目录data的相关参数
Gitblit服务器搭建【基于windown系统】具体修改参数如下:
1: git.repositoriesFolder = E:\zhylbGitProject【为上一步创建的目录】
2:server.httpPort = 8443 【访问端口号】
3:server.httpBindInterface = 10.0.0.5 【本机IP地址】

step3:启动gtiblit

双击gitblit.bat 启动gitblit 输入localhost:8443 进行访问
Gitblit服务器搭建【基于windown系统】
初始密码为admin,admin
Gitblit服务器搭建【基于windown系统】

二:Gitblit配置

1:基础配置

Step1:成员配置
进行用户的添加和相关权限配置
Gitblit服务器搭建【基于windown系统】
Gitblit服务器搭建【基于windown系统】
Step2:团队配置
进行团队添加并进行相关的访问权限配置
Gitblit服务器搭建【基于windown系统】

2:仓库配置

Step1: 新建仓库
Gitblit服务器搭建【基于windown系统】
Step2:仓库编辑
Gitblit服务器搭建【基于windown系统】

3:秘钥设置

Step1: 秘钥生成

右键gitBash 注意此处跳过git安装过程
做如下三步操作
1:git config --global user.name [username] 如:git config --global user.name zhansan
2:git config --global user.email [email] 如:it config --global user.email [email protected]
3:ssh-****** -t rsa -C "[email protected]"

注意:生成秘钥之前需要查看是否已经存在秘钥,若存在且需要重新生成一个新的**对,则执行命令 ssh-****** -t rsa -C "[email protected]" -f ~/.ssh/zhansan 则会生成新的**对
Gitblit服务器搭建【基于windown系统】

Step2:配置秘钥对

打开刚生成的**对粘贴复制里面的内容到用户中心进行添加ssh即可
Gitblit服务器搭建【基于windown系统】
Gitblit服务器搭建【基于windown系统】

参考文章 :1:https://wenku.baidu.com/view/09e9c08f4128915f804d2b160b4e767f5bcf8070.html