gitlab的使用(三)

1、gitlab汉化配置
1)下载汉化补丁
[root@git ~]# git clone https://gitlab.com/xhang/gitlab.git
2)查看全部分支版本

[root@git ~]# cd gitlab
[root@git gitlab]# git branch -a
* 12-3-stable-zh
  remotes/origin/10-0-stable
  remotes/origin/10-0-stable-zh
  remotes/origin/10-1-stable
  remotes/origin/10-1-stable-zh
  remotes/origin/10-2-stable
  remotes/origin/10-2-stable-zh
  remotes/origin/10-3-stable
  remotes/origin/10-3-stable-zh
  remotes/origin/10-4-stable
  remotes/origin/10-4-stable-zh
  remotes/origin/10-5-stable
  remotes/origin/10-5-stable-zh
  remotes/origin/10-6-stable
  remotes/origin/10-6-stable-zh
  remotes/origin/10-7-stable
  remotes/origin/10-7-stable-zh
  remotes/origin/10-8-stable
  remotes/origin/10-8-stable-zh
  remotes/origin/11-0-stable
  remotes/origin/11-0-stable-zh
  remotes/origin/11-1-stable

3)对比版本、生成补丁包
git diff remotes/origin/10-2-stable remotes/origin/10-2-stable-zh > /tmp/10.2.2-zh.diff
4)停止服务器

[root@git ~]# gitlab-ctl stop
[root@git ~]# yum install patch -y
[root@git ~]# patch -d /opt/gitlab/embedded/service/gitlab-rails/  -p1 < /tmp/10.2.2-zh.diff

5)启动和重新配置

[root@git ~]# gitlab-ctl start
[root@git ~]# gitlab-ctl reconfigure

2、外观配置
管理区域-外观

退出并重新登录

3、创建组-用户-项目
创建组

设置组名称、描述等创建群组

创建用户


为用户设置密码


把用户添加到组里面
管理区域-选择创建的oldboy组进行添加用户、权限给开发人员-增加用户到群组

创建项目
管理区域-创建项目

4、添加gitlab的远程仓库,进行代码上传

[root@git ~]# ssh-keygen
[root@git ~]# cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCr9HNw4GNGEm9UlMnr08wyRiNZWwnV8Pr5rno7ONP7PbLl34rhT6fl1EK7WrWPQMDfYkHE/bYK3mejnwqgiXgGhkPDe4AA05h0CFTZOVSDDco9vnNqyo7mTbbH6I9Fzgxco0aeKohsrpgudnlAhSQwZC+BJfomZEvtWtWyKD3N4V6wm+1+jeoGIpbbijysSA4aQMecRxFODvzPTEERfjaYlHKvDzwfo38Cgij22h2powhLjHoeV9TLWus7l2IhJ2faYEtABqdLfFgp4bybbK1ZoG+CmsGw1qUBUOeXW2A69rdz3hgal/AOyl3yHvGuCObbxhkCpdY5oKG0aaqAl4uF root@git

[root@git git_dada]# echo "hello world" >1.txt
[root@git git_dada]# git add .
[root@git git_dada]# git commit -m "touch 1.txt"
[root@git git_dada]# git push -u origin master
To git@10.0.0.7:oldboy/get_test.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
posted @ 2021-12-29 11:54  熊孩子Ajie  阅读(101)  评论(0)    收藏  举报