GitLab服务器搭建
使用rpm包本地部署GitLab服务器
[root@gitlab ~]
total used free shared buff/cache available
Mem: 4021 116 3786 16 118 3720
Swap: 0 0 0
[root@gitlab ~]
[root@gitlab GitLab]
[root@gitlab GitLab]
gitlab-ce-12.4.6-ce.0.el7.x86_64
[root@gitlab GitLab]
[root@gitlab GitLab]
GitLab使用
[root@gitlab GitLab]
LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=3946,fd=7),("nginx",pid=3945,fd=7),("nginx",pid=3944,fd=7))
LISTEN 0 511 0.0.0.0:8060 0.0.0.0:* users:(("nginx",pid=3946,fd=8),("nginx",pid=3945,fd=8),("nginx",pid=3944,fd=8))
- 先修改密码

- 通过修改后的密码进行登录,用户名默认为root

- 登录成功后,会显示以下页面

- 修改配置项,将语言修改为中文



GitLab用户管理
- 进入管理界面

- 创建新用户


- 设置密码


GitLab组管理


- guest--------->老板
- reporter------>测试人员
- developer----->开发者
- maintainer---->维护者
- owner--------->创建者


Git项目管理




代码托管
[root@Programer ~]
[root@Programer myproject]
[root@Programer myproject]
[root@Programer myproject]
origin http://192.168.88.20/devops/myproject.git (fetch)
origin http://192.168.88.20/devops/myproject.git (push)
[root@Programer myproject]
Username for 'http://192.168.88.20': mark
Password for 'http://[email protected]':
枚举对象中: 29, 完成.
对象计数中: 100% (29/29), 完成.
使用 2 个线程进行压缩
压缩对象中: 100% (19/19), 完成.
写入对象中: 100% (29/29), 2.21 KiB | 2.21 MiB/s, 完成.
总共 29(差异 5),复用 0(差异 0),包复用 0
remote:
remote: To create a merge request for feature, visit:
remote: http://gitlab.example.com/devops/myproject/merge_requests/new?merge_request%5Bsource_branch%5D=feature
remote:
remote: To create a merge request for hotfix, visit:
remote: http://gitlab.example.com/devops/myproject/merge_requests/new?merge_request%5Bsource_branch%5D=hotfix
remote:
To http://192.168.88.20/devops/myproject.git
* [new branch] feature -> feature
* [new branch] hotfix -> hotfix
* [new branch] master -> master
分支 'feature' 设置为跟踪来自 'origin' 的远程分支 'feature'。
分支 'hotfix' 设置为跟踪来自 'origin' 的远程分支 'hotfix'。
分支 'master' 设置为跟踪来自 'origin' 的远程分支 'master'。
[root@Programer myproject]
Username for 'http://192.168.88.20': mark
Password for 'http://[email protected]':
总共 0(差异 0),复用 0(差异 0),包复用 0
To http://192.168.88.20/devops/myproject.git
* [new tag] v1 -> v1

HTTP免密推送
[root@Programer myproject]
[root@Programer myproject]
Username for 'http://192.168.88.20': mark
Password for 'http://[email protected]':
Everything up-to-date
[root@Programer myproject]
Everything up-to-date
[root@Programer myproject]
user.name=mark
user.email=[email protected]
init.defaultbranch=master
credential.helper=store
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=http://192.168.88.20/devops/myproject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.feature.remote=origin
branch.feature.merge=refs/heads/feature
branch.hotfix.remote=origin
branch.hotfix.merge=refs/heads/hotfix
branch.master.remote=origin
branch.master.merge=refs/heads/master
[root@Programer myproject]
http://mark:[email protected]
HIS代码托管
- HIS代码准备
[root@Programer ~]
HIS.zip
[root@Programer ~]
[root@Programer ~]
HIS-BACKEND
HIS-CONFIG
HIS-FONTEND
HIS-FONTEND-DEPENDENCY
HIS-FONTEND-SOURCECODE
HIS-SQL
[root@Programer ~]
- HIS后端代码托管


[root@Programer ~]
[root@Programer HIS-BACKEND]
已初始化空的 Git 仓库于 /root/HIS/HIS-BACKEND/.git/
[root@Programer HIS-BACKEND]
[root@Programer HIS-BACKEND]
origin http://192.168.88.20/devops/HIS-BACKEND.git (fetch)
origin http://192.168.88.20/devops/HIS-BACKEND.git (push)
[root@Programer HIS-BACKEND]
[root@Programer HIS-BACKEND]
[root@Programer HIS-BACKEND]
[root@Programer HIS-BACKEND]
枚举对象中: 518, 完成.
对象计数中: 100% (518/518), 完成.
使用 2 个线程进行压缩
压缩对象中: 100% (464/464), 完成.
写入对象中: 100% (518/518), 272.81 KiB | 5.57 MiB/s, 完成.
总共 518(差异 256),复用 0(差异 0),包复用 0
remote: Resolving deltas: 100% (256/256), done.
To http://192.168.88.20/devops/HIS-BACKEND.git
* [new branch] master -> master
分支 'master' 设置为跟踪来自 'origin' 的远程分支 'master'。
[root@Programer HIS-BACKEND]
总共 0(差异 0),复用 0(差异 0),包复用 0
To http://192.168.88.20/devops/HIS-BACKEND.git
* [new tag] v1 -> v1
[root@Programer HIS-BACKEND]

- HIS前端代码托管


[root@Programer HIS-BACKEND]
[root@Programer ~]
[root@Programer HIS-FONTEND]
已初始化空的 Git 仓库于 /root/HIS/HIS-FONTEND/.git/
[root@Programer HIS-FONTEND]
[root@Programer HIS-FONTEND]
origin http://192.168.88.20/devops/HIS-FONTEND.git (fetch)
origin http://192.168.88.20/devops/HIS-FONTEND.git (push)
[root@Programer HIS-FONTEND]
[root@Programer HIS-FONTEND]
[root@Programer HIS-FONTEND]
枚举对象中: 81, 完成.
对象计数中: 100% (81/81), 完成.
使用 2 个线程进行压缩
压缩对象中: 100% (81/81), 完成.
写入对象中: 100% (81/81), 2.91 MiB | 8.10 MiB/s, 完成.
总共 81(差异 16),复用 0(差异 0),包复用 0
To http://192.168.88.20/devops/HIS-FONTEND.git
* [new branch] master -> master
分支 'master' 设置为跟踪来自 'origin' 的远程分支 'master'。
[root@Programer HIS-FONTEND]
总共 0(差异 0),复用 0(差异 0),包复用 0
To http://192.168.88.20/devops/HIS-FONTEND.git
* [new tag] v1 -> v1
[root@Programer HIS-FONTEND]
