Lazy loaded imageGitLab

type
status
date
slug
summary
tags
category
icon
password
若下载速度慢,可以下面的地址

目录

获取安装包

安装 gitlab

注意:安装完默认数据在 / OPT 目录下,一般不建议修改

配置 gitlab

初始化 gitlab

初始化有一定的时间

查看 gitlab 状态

启停命令

登录 gitlab 页面

注意如打开以后是 502 的界面,可使用 gitlab-ctl status 查看下,检查 80 和 8080 端口是否被占用,内存是否满载 首次登录,设置 root 密码,密码策略最少 8 位
notion image

这个注册会关闭,稍后设置

notion image

管理用户名默认为 root,密码则是刚设置的

notion image

关闭注册功能

注意:Sign-in restrictions 此选项是关闭登录,修改相关复杂,需要进入到数据库中再打开此功能项
notion image
notion image

验证下,此时没有注册功能了

notion image

修改管理员账号邮箱

notion image
notion image
收到邮箱 后点击确认即可

创建账户

notion image
Email 用于账户重置密码使用 Access level Regular 为普通用户,Admin 为管理员
notion image

设置账户密码

方法一:管理员设置

notion image
notion image
notion image

方法二:通过刚创建的账户设置的邮箱重设密码

notion image
notion image
notion image

创建组

不同业务划分不同的组
notion image
notion image

将用户添加到组中

权限 Owner 所有权限,Developer 仅开发
notion image
notion image

创建项目

notion image
notion image

在此项目中创建一个版本 web 文件

notion image
notion image

查看项目连接地址

notion image
有两种方式,SSH 和 HTTP 的方式

客户端使用 HTTP 方式

git 常用命令

示例

修改代码并提交代码上传至 gitlab 服务器

查看 gitlab 页面

notion image

查看操作日志

多提交几个版本,便于后期做回滚操作测试此处省略

查看版本

回滚上一个版本

回滚上上个版本

回滚到指定的版本

更新至最新版本

查看当前分支

gitlab 门户也可以查看历史分支

notion image

创建分支

notion image
notion image

切换分支

验证

develop 分支

notion image

master 分支

notion image

 
上一篇
firewalld
下一篇
haproxy
Loading...