一.安装gitlab
1. 需要先安装依赖包
[root@localhost ~]# yum install -y curl policycoreutils-python openssh-server postfix
2.gitlab 下载网址:
[root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.0.2-ce.0.el7.x86_64.rpm
[root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.0.2-ce.0.el7.x86_64.rpm --no-check-certificate
如果第一条安装不了,需要加上 no-check-certificate
[root@localhost ~]# yum install gitlab-ce-15.0.2-ce.0.el7.x86_64.rpm
安装GIT
安装成功界面·
3.修改配置文件
[root@localhost ~]# vim /etc/gitlab/gitlab.rb
4.重新加载配置内容和重启gitlab
gitlab-ctl reconfigure
gitlab-ctl restart
切记:关闭防火墙哦
5.
二.web界面设置
2.1添加用户
2.1创建组并添加用户,tom为管理员
2.2设置ssh key
需要在gitlab的ssh key中加入公钥
2.3创建项目
选择创建空项目
2.4 切换管理员pm 账号,创建里程碑
创建里程碑
为用户分配任务
2.5在gitlab拉取项目
2.6 创建和切换分支
首先要初始化项目
git branch index 创建分支
git chcekout index 切换分支
2.7 创建文件并推送到gitlab
2.8root 直接合并请求