CICD-GitLib
CICD-GitLib

CICD-GitLib

GitLab组件介绍

 GitLab系统各组件的简要功用说明

◼ Gitaly:Git RPC service for handing all Git calls made by GitLab

◼ GitLab Exporter:GitLab指标暴露器

◼ GitLab Page:GitLab的静态Web站点

◼ GitLab self-monitoring的多个组件:Prometheus、Alertmanager、Grafana、Sentry和Jaeger

◼ GitLab shell:处理基于ssh会话的git命令

◼ GitLab Workhorse:智能反向代理,处理高并发的HTTP请求

◼ Inbound emails(SMPT):接收用于更新issue的邮件

◼ Outbound email (SMTP):向用户发送邮件通知

◼ LDAP Authentication:LDAP认证集成

◼ Mattermost:开源的Slack

MinIO:对象存储服务

◼ NGINX:将请求路由到正确的组件上,并终止SSL会话

◼ Praefect:Git客户端和Gitaly存储节点之间的透明代理

◼ Node Exporter:节点指标暴露器

◼ PostgreqSQL:数据库,还有一个用于暴露其指标的PostgreSQL Exporter组件

◼ Puma (GitLab Rails):处理发往Web接口和API的请求

◼ Redis:缓存服务,还有一个用于暴露其指标的Redis Exporter组件

◼ Registry:容器注册表,支持Image的push和pull操作

◼ Runner:执行GitLab的CI/CD作业

◼ Sentry integration:跟踪部署的各应用的错误信息

◼ Sidekiq:后台作业处理器

部署GitLab方法

GitLab包含了众多组件,其中的多个组件都有着特定的部署要求

◼ https://docs.gitlab.cn/jh/install/requirements.html

安装方法

◼ Linux安装包:官方的 deb/rpm 安装包(也被称作 Omnibus GitLab)包含极狐GitLab 和依赖的组件,包括PostgreSQL、Redis 和 Sidekiq

◼ Helm Chart:用于在 Kubernetes 上安装极狐GitLab 及其所有组件的云原生 Helm chart

◼ Docker:Docker 容器化的极狐GitLab 软件包

◼ Source:源码安装,在GitLab没有提供适用的安装包的平台上(例如各类BSD系统)只能采用这种安装方式

◼ GitLab Environment Toolkit(GET):自动化工具集,用于在主流的公有云(Azure、GCP和AWS)上部署GitLab

◼ GitLab Operator:Kubernetes Operator风格的部署模式

Omnibus GitLab architecture and components

Omnibus GitLab是基于Chef的应用编排工具,它基于Chef的cookbooks和recipes等组件自动化编排GitLab的各组件,避免了用户复杂的配置过程

◼ 相关项目 https://gitlab.com/gitlab-org/omnibus-gitlab

部署GitLab

二进制部署

下载程序包:
https://packages.gitlab.com/gitlab/gitlab-ce
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce=15.6.0-ce.0
程序包安装:
        /etc/gitlab/ 配置文件目录
            /etc/gitlab/gitlab.rb
            /etc/gitlab/initial_root_password
        /var/opt/gitlab/  数据目录
        /var/log/gitlab/  日志目录

        如果需要自设初始密码,配置参数
            gitlab_rails['initial_root_password']

        默认的管理员:
            账号:root
            初始密码保存文件:/etc/gitlab/initial_root_password

        下载GitLab:
            https://packages.gitlab.com/app/gitlab/gitlab-ce/search
            https://packages.gitlab.com/gitlab/gitlab-ce

docker-compoes部署(官方镜像)

[root@ubuntu2004 01-gitlab-ce-official]#ls
docker-compose.yaml  README.md
[root@ubuntu2004 01-gitlab-ce-official]#cat docker-compose.yaml 
version: '3.6'

volumes:
  gitlab_data: {}
  gitlab_logs: {}
  gitlab_conf: {}

networks:
  gitlab_net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.31.0.0/24

services:
  gitlab:
    image: gitlab/gitlab-ce:15.6.0-ce.0
    restart: always
    hostname: 'gitlab.example.com'
    environment:
      GITLAB_HOME: /gitlab
      GITLAB_OMNIBUS_CONFIG: |
        #external_url 'https://code.shuhong.com'
        gitlab_rails['gitlab_shell_ssh_port'] = 22022
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - '80:80'
        #- '443:443'
      - '22022:22'
    volumes:
      #- 'gitlab_conf:/etc/gitlab'
      #- 'gitlab_logs:/var/log/gitlab'
      #- 'gitlab_data:/var/opt/gitlab'
      - '$GITLAB_HOME/config:/etc/gitlab'
      - '$GITLAB_HOME/logs:/var/log/gitlab'
      - '$GITLAB_HOME/data:/var/opt/gitlab'
    shm_size: '256m'
    networks:
      gitlab_net:
        ipv4_address: 172.31.0.2
        aliases:
          - codehub
[root@ubuntu2004 01-gitlab-ce-official]#cat README.md 
# GitLab CE

该项目中使用了GitLab官方制作的gitlab-ce镜像。

### Init Password

获取 root init password

docker-compose exec gitlab grep 'Password:' /etc/gitlab/initial_root_password
[root@ubuntu2004 01-gitlab-ce-official]#docker-compose up -d /usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " WARNING: The GITLAB_HOME variable is not set. Defaulting to a blank string. Creating network "01-gitlab-ce-official_gitlab_net" with driver "bridge" Creating 01-gitlab-ce-official_gitlab_1 ... done [root@ubuntu2004 01-gitlab-ce-official]#docker-compose ps /usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Name Command State Ports ------------------------------------------------------------------------------------------------------------------------------------------------------------ 01-gitlab-ce-official_gitlab_1 /assets/wrapper Up (health: starting) 0.0.0.0:22022->22/tcp,:::22022->22/tcp, 443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp

docker-compoes部署(拆分)

[root@ubuntu2004 02-gitlab-ce-basics]#ls
docker-compose.yaml  gitlab  postgresql  README.md
[root@ubuntu2004 02-gitlab-ce-basics]#tree .
.
├── docker-compose.yaml
├── gitlab
│   └── environments
├── postgresql
│   └── environments
└── README.md

2 directories, 4 files

[root@ubuntu2004 02-gitlab-ce-basics]#cat docker-compose.yaml
version: '3.6'

volumes:
  redis_data: {}
  postgresql_data: {}
  gitlab_data: {}

networks:
  gitlab_net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.31.2.0/24

services:

  redis:
    restart: always
    image: redis:6.2.6
    networks:
      gitlab_net:
        ipv4_address: 172.31.2.8
        aliases:
          - kvstor
    command:
    - --loglevel warning
    volumes:
    - redis_data:/data:Z

  postgresql:
    restart: always
    image: sameersbn/postgresql:12-20200524
    networks:
      gitlab_net:
        ipv4_address: 172.31.2.9
        aliases:
          - db
          - dbstor
    volumes:
    - postgresql_data:/var/lib/postgresql:Z
    env_file:
      - postgresql/environments

  gitlab:
    image: sameersbn/gitlab:15.5.0
    hostname: gitlab.shuhong.com
    hostname: gitlab.shuhong.com
    depends_on:
    - redis
    - postgresql
    networks:
      gitlab_net:
        ipv4_address: 172.31.2.2
        aliases:
          - gitlab
          - ci
          - codehub
    ports:
    - "80:80"
    - "10022:22"
    volumes:
    - gitlab_data:/home/git/data:Z
    healthcheck:
      test: ["CMD", "/usr/local/sbin/healthcheck"]
      interval: 2m
      timeout: 10s
      retries: 3
      start_period: 5m
    env_file:
      - gitlab/environments
    restart: always

[root@ubuntu2004 02-gitlab-ce-basics]#cat gitlab/environments 
DEBUG=false

DB_ADAPTER=postgresql
DB_HOST=postgresql
DB_PORT=5432
DB_USER=gitlab
DB_PASS=123456
DB_NAME=gitlabhq_production

REDIS_HOST=redis
REDIS_PORT=6379

TZ=Asia/Shanghai
GITLAB_TIMEZONE=Asia/Shanghai

GITLAB_HTTPS=false
SSL_SELF_SIGNED=false

GITLAB_HOST=gitlab.shuhong.com
GITLAB_PORT=80
GITLAB_SSH_PORT=10022
GITLAB_RELATIVE_URL_ROOT=
GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alphanumeric-string
GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alphanumeric-string
GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alphanumeric-string

GITLAB_ROOT_PASSWORD=shuhong.com
GITLAB_ROOT_EMAIL=shuhong@shuhong.com

GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
GITLAB_NOTIFY_PUSHER=false

GITLAB_EMAIL=notifications@shuhong.com
GITLAB_EMAIL_REPLY_TO=noreply@shuhong.com
GITLAB_INCOMING_EMAIL_ADDRESS=reply@shuhong.com

GITLAB_BACKUP_SCHEDULE=daily
GITLAB_BACKUP_TIME=01:00

SMTP_ENABLED=false
SMTP_DOMAIN=mail.shuhong.com
SMTP_HOST=smtp.shuhong.com
SMTP_PORT=587
SMTP_USER=mailer@shuhong.com
SMTP_PASS=password
SMTP_STARTTLS=true
SMTP_AUTHENTICATION=login

IMAP_ENABLED=false
IMAP_HOST=imap.shuhong.com
IMAP_PORT=993
IMAP_USER=mailer@shuhong.com
IMAP_PASS=password
IMAP_SSL=true
IMAP_STARTTLS=false

OAUTH_ENABLED=false
OAUTH_AUTO_SIGN_IN_WITH_PROVIDER=
OAUTH_ALLOW_SSO=
OAUTH_BLOCK_AUTO_CREATED_USERS=true
OAUTH_AUTO_LINK_LDAP_USER=false
OAUTH_AUTO_LINK_SAML_USER=false
OAUTH_EXTERNAL_PROVIDERS=

OAUTH_CAS3_LABEL=cas3
OAUTH_CAS3_SERVER=
OAUTH_CAS3_DISABLE_SSL_VERIFICATION=false
OAUTH_CAS3_LOGIN_URL=/cas/login
OAUTH_CAS3_VALIDATE_URL=/cas/p3/serviceValidate
OAUTH_CAS3_LOGOUT_URL=/cas/logout

OAUTH_GOOGLE_API_KEY=
OAUTH_GOOGLE_APP_SECRET=
OAUTH_GOOGLE_RESTRICT_DOMAIN=

OAUTH_FACEBOOK_API_KEY=
OAUTH_FACEBOOK_APP_SECRET=

OAUTH_TWITTER_API_KEY=
OAUTH_TWITTER_APP_SECRET=

OAUTH_GITHUB_API_KEY=
OAUTH_GITHUB_APP_SECRET=
OAUTH_GITHUB_URL=
OAUTH_GITHUB_VERIFY_SSL=

OAUTH_GITLAB_API_KEY=
OAUTH_GITLAB_APP_SECRET=

OAUTH_BITBUCKET_API_KEY=
OAUTH_BITBUCKET_APP_SECRET=
OAUTH_BITBUCKET_URL=

OAUTH_SAML_ASSERTION_CONSUMER_SERVICE_URL=
OAUTH_SAML_IDP_CERT_FINGERPRINT=
OAUTH_SAML_IDP_SSO_TARGET_URL=
OAUTH_SAML_ISSUER=
OAUTH_SAML_LABEL="Our SAML Provider"
OAUTH_SAML_NAME_IDENTIFIER_FORMAT=urn:oasis:names:tc:SAML:2.0:nameid-format:transient
OAUTH_SAML_GROUPS_ATTRIBUTE=
OAUTH_SAML_EXTERNAL_GROUPS=
OAUTH_SAML_ATTRIBUTE_STATEMENTS_EMAIL=
OAUTH_SAML_ATTRIBUTE_STATEMENTS_NAME=
OAUTH_SAML_ATTRIBUTE_STATEMENTS_USERNAME=
OAUTH_SAML_ATTRIBUTE_STATEMENTS_FIRST_NAME=
OAUTH_SAML_ATTRIBUTE_STATEMENTS_LAST_NAME=

OAUTH_CROWD_SERVER_URL=
OAUTH_CROWD_APP_NAME=
OAUTH_CROWD_APP_PASSWORD=

OAUTH_AUTH0_CLIENT_ID=
OAUTH_AUTH0_CLIENT_SECRET=
OAUTH_AUTH0_DOMAIN=
OAUTH_AUTH0_SCOPE=

OAUTH_AZURE_API_KEY=
OAUTH_AZURE_API_SECRET=
OAUTH_AZURE_TENANT_ID=

[root@ubuntu2004 02-gitlab-ce-basics]#cat postgresql/environments 
DB_USER=gitlab
DB_PASS=123456
DB_NAME=gitlabhq_production
DB_EXTENSION=pg_trgm,btree_gist

[root@ubuntu2004 02-gitlab-ce-basics]#docker-compose up -d
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Creating network "02-gitlab-ce-basics_gitlab_net" with driver "bridge"
Creating 02-gitlab-ce-basics_redis_1      ... done
Creating 02-gitlab-ce-basics_postgresql_1 ... done
Creating 02-gitlab-ce-basics_gitlab_1     ... done
[root@ubuntu2004 02-gitlab-ce-basics]#docker ps
CONTAINER ID   IMAGE                                       COMMAND                  CREATED         STATUS                            PORTS                                                                                                                                   NAMES
27cadea60b38   sameersbn/gitlab:15.5.0                     "/sbin/entrypoint.sh…"   4 seconds ago   Up 3 seconds (health: starting)   0.0.0.0:80->80/tcp, :::80->80/tcp, 443/tcp, 0.0.0.0:10022->22/tcp, :::10022->22/tcp                                                     02-gitlab-ce-basics_gitlab_1
4e7286b8a8f3   sameersbn/postgresql:12-20200524            "/sbin/entrypoint.sh"    5 seconds ago   Up 4 seconds                      5432/tcp                                                                                                                                02-gitlab-ce-basics_postgresql_1
cbdcac22e4c2   redis:6.2.6                                 "docker-entrypoint.s…"   5 seconds ago   Up 4 seconds                      6379/tcp                                                                                                                                02-gitlab-ce-basics_redis_1

Kubernetes部署

gitlab应用

更改语言

管理员界面及功能

创建用户

创建群组

新建项目

协同合作开发模式

登录jerry用户克隆项目

[root@ubuntu2004 gitlab]#cd spring-boot-helloWorld/
[root@ubuntu2004 spring-boot-helloWorld]#
[root@ubuntu2004 spring-boot-helloWorld]#git config user.name jerry
[root@ubuntu2004 spring-boot-helloWorld]#git config user.email jerry@sh.com
[root@ubuntu2004 spring-boot-helloWorld]#git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=http://gitlab.shuhong.com/devops/spring-boot-helloWorld.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
user.name=jerry
user.email=jerry@sh.com

[root@ubuntu2004 spring-boot-helloWorld]#git branch -l
* main
[root@ubuntu2004 spring-boot-helloWorld]#git checkout -b feature/001
切换到一个新分支 'feature/001'
[root@ubuntu2004 spring-boot-helloWorld]#git branch -l
* feature/001
  main
[root@ubuntu2004 spring-boot-helloWorld]#vim README.md 
# spring-boot-helloWorld
Spring Boot Example.

80/tcp
New feature by jerry

[root@ubuntu2004 spring-boot-helloWorld]#git add .
[root@ubuntu2004 spring-boot-helloWorld]#git status 
位于分支 feature/001
要提交的变更:
  (使用 "git restore --staged <文件>..." 以取消暂存)
	修改:     README.md

[root@ubuntu2004 spring-boot-helloWorld]#git commit -m "update README.md by jerry"
[feature/001 8b82472] update README.md by jerry
 1 file changed, 1 insertion(+)
[root@ubuntu2004 spring-boot-helloWorld]#git log --oneline
8b82472 (HEAD -> feature/001) update README.md by jerry
03ff8ee (origin/main, origin/HEAD, main) update to v0.9.6
405836c update pom.xml.
a220f32 update src/main/java/com/neo/controller/HelloWorldController.java.
468a9f8 update pom.xml.
c0c23cf update pom.xml.
7bec6cc update pom.xml.
d333ea7 update src/test/java/com/neo/controller/HelloTests.java.
3eb437c v0.9.2
2e8ffde v0.9.1
c8afc09 bug fix
40e84e7 bug fix
47ce7a7 update to v0.9.0
4f0f467 Create Dockerfile
7ac25e9 (tag: v0.2) README.md
8dd6d08 v0.1.1
41bfb08 Bug fix...
72cb994 (tag: v0.1) v0.1
59c23b6 Initial Commit...
daddedc Initial commit

[root@ubuntu2004 spring-boot-helloWorld]#git push origin 
fatal: 当前分支 feature/001 没有对应的上游分支。
为推送当前分支并建立与远程上游的跟踪,使用

    git push --set-upstream origin feature/001

[root@ubuntu2004 spring-boot-helloWorld]#git push --set-upstream origin feature/001
Username for 'http://gitlab.shuhong.com': jerry
Password for 'http://jerry@gitlab.shuhong.com': 
枚举对象中: 5, 完成.
对象计数中: 100% (5/5), 完成.
使用 2 个线程进行压缩
压缩对象中: 100% (3/3), 完成.
写入对象中: 100% (3/3), 331 字节 | 331.00 KiB/s, 完成.
总共 3 (差异 1),复用 0 (差异 0)
remote: 
remote: To create a merge request for feature/001, visit:
remote:   http://gitlab.shuhong.com/devops/spring-boot-helloWorld/-/merge_requests/new?merge_request%5Bsource_branch%5D=feature%2F001
remote: 
To http://gitlab.shuhong.com/devops/spring-boot-helloWorld.git
 * [new branch]      feature/001 -> feature/001
分支 'feature/001' 设置为跟踪来自 'origin' 的远程分支 'feature/001'。

派生方式

创建一个部署于本组的用户,项目属于内部项目可以看到被拉去,但不能上传

[root@ubuntu2004 george]#git clone http://gitlab.shuhong.com/george/spring-boot-helloWorld.git
正克隆到 'spring-boot-helloWorld'...
Username for 'http://gitlab.shuhong.com': george
Password for 'http://george@gitlab.shuhong.com': 
remote: Enumerating objects: 168, done.
remote: Counting objects: 100% (168/168), done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 168 (delta 50), reused 161 (delta 47), pack-reused 0
接收对象中: 100% (168/168), 24.48 KiB | 2.22 MiB/s, 完成.
处理 delta 中: 100% (50/50), 完成.
[root@ubuntu2004 george]#ls
spring-boot-helloWorld
[root@ubuntu2004 george]#cd spring-boot-helloWorld/
[root@ubuntu2004 spring-boot-helloWorld]#ls
deploy  Dockerfile  Jenkinsfile  LICENSE  pom.xml  README.md  src

[root@ubuntu2004 spring-boot-helloWorld]#git config --local user.name george
[root@ubuntu2004 spring-boot-helloWorld]#git config --local user.email george@sh.com
[root@ubuntu2004 spring-boot-helloWorld]#git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=http://gitlab.shuhong.com/george/spring-boot-helloWorld.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
user.name=george
user.email=george@sh.com

[root@ubuntu2004 spring-boot-helloWorld]#git checkout -b feature/002
切换到一个新分支 'feature/002'
[root@ubuntu2004 spring-boot-helloWorld]#git branch 
* feature/002
  main

[root@ubuntu2004 spring-boot-helloWorld]#vim README.md 
# spring-boot-helloWorld
Spring Boot Example.

80/tcp
New feature by george

[root@ubuntu2004 spring-boot-helloWorld]#
[root@ubuntu2004 spring-boot-helloWorld]#git add .
[root@ubuntu2004 spring-boot-helloWorld]#git status 
位于分支 feature/002
要提交的变更:
  (使用 "git restore --staged <文件>..." 以取消暂存)
	修改:     README.md

[root@ubuntu2004 spring-boot-helloWorld]#git commit -m "update README.md by george"
[feature/002 edfae73] update README.md by george
 1 file changed, 1 insertion(+), 1 deletion(-)
[root@ubuntu2004 spring-boot-helloWorld]#git log --oneline
edfae73 (HEAD -> feature/002) update README.md by george
bdc4e57 (origin/main, origin/HEAD, main) Merge branch 'feature/001' into 'main'
8b82472 update README.md by jerry
03ff8ee update to v0.9.6
405836c update pom.xml.
a220f32 update src/main/java/com/neo/controller/HelloWorldController.java.
468a9f8 update pom.xml.
c0c23cf update pom.xml.
7bec6cc update pom.xml.
d333ea7 update src/test/java/com/neo/controller/HelloTests.java.
3eb437c v0.9.2
2e8ffde v0.9.1
c8afc09 bug fix
40e84e7 bug fix
47ce7a7 update to v0.9.0
4f0f467 Create Dockerfile
7ac25e9 (tag: v0.2) README.md
8dd6d08 v0.1.1
41bfb08 Bug fix...
72cb994 (tag: v0.1) v0.1
59c23b6 Initial Commit...
daddedc Initial commit

[root@ubuntu2004 spring-boot-helloWorld]#git push origin 
fatal: 当前分支 feature/002 没有对应的上游分支。
为推送当前分支并建立与远程上游的跟踪,使用

    git push --set-upstream origin feature/002
[root@ubuntu2004 spring-boot-helloWorld]#git push --set-upstream origin feature/002
Username for 'http://gitlab.shuhong.com': george
Password for 'http://george@gitlab.shuhong.com': 
枚举对象中: 5, 完成.
对象计数中: 100% (5/5), 完成.
使用 2 个线程进行压缩
压缩对象中: 100% (3/3), 完成.
写入对象中: 100% (3/3), 291 字节 | 145.00 KiB/s, 完成.
总共 3 (差异 2),复用 0 (差异 0)
remote: 
remote: To create a merge request for feature/002, visit:
remote:   http://gitlab.shuhong.com/george/spring-boot-helloWorld/-/merge_requests/new?merge_request%5Bsource_branch%5D=feature%2F002
remote: 
To http://gitlab.shuhong.com/george/spring-boot-helloWorld.git
 * [new branch]      feature/002 -> feature/002
分支 'feature/002' 设置为跟踪来自 'origin' 的远程分支 'feature/002'。
原生库并没有feature/002的分支
#从主库拉代码,改完后推到自己的库
[root@ubuntu2004 spring-boot-helloWorld]#git remote -v
origin	http://gitlab.shuhong.com/george/spring-boot-helloWorld.git (fetch)
origin	http://gitlab.shuhong.com/george/spring-boot-helloWorld.git (push)
[root@ubuntu2004 spring-boot-helloWorld]#git remote add upstream http://gitlab.shuhong.com/devops/spring-boot-helloWorld.git
[root@ubuntu2004 spring-boot-helloWorld]#git remote -v
origin	http://gitlab.shuhong.com/george/spring-boot-helloWorld.git (fetch)
origin	http://gitlab.shuhong.com/george/spring-boot-helloWorld.git (push)
upstream	http://gitlab.shuhong.com/devops/spring-boot-helloWorld.git (fetch)
upstream	http://gitlab.shuhong.com/devops/spring-boot-helloWorld.git (push)
#jerry用户重新pull项目
[root@ubuntu2004 spring-boot-helloWorld]#git checkout main 
切换到分支 'main'
您的分支与上游分支 'origin/main' 一致。
[root@ubuntu2004 spring-boot-helloWorld]#git log --oneline 
03ff8ee (HEAD -> main, origin/main, origin/HEAD) update to v0.9.6
405836c update pom.xml.
a220f32 update src/main/java/com/neo/controller/HelloWorldController.java.
468a9f8 update pom.xml.
c0c23cf update pom.xml.
7bec6cc update pom.xml.
d333ea7 update src/test/java/com/neo/controller/HelloTests.java.
3eb437c v0.9.2
2e8ffde v0.9.1
c8afc09 bug fix
40e84e7 bug fix
47ce7a7 update to v0.9.0
4f0f467 Create Dockerfile
7ac25e9 (tag: v0.2) README.md
8dd6d08 v0.1.1
41bfb08 Bug fix...
72cb994 (tag: v0.1) v0.1
59c23b6 Initial Commit...
daddedc Initial commit
[root@ubuntu2004 spring-boot-helloWorld]#git pull
Username for 'http://gitlab.shuhong.com': jerry
Password for 'http://jerry@gitlab.shuhong.com': 
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 2), reused 3 (delta 2), pack-reused 0
展开对象中: 100% (5/5), 797 字节 | 199.00 KiB/s, 完成.
来自 http://gitlab.shuhong.com/devops/spring-boot-helloWorld
   03ff8ee..782976d  main       -> origin/main
更新 03ff8ee..782976d
Fast-forward
 README.md | 1 +
 1 file changed, 1 insertion(+)
[root@ubuntu2004 spring-boot-helloWorld]#git log --oneline 
782976d (HEAD -> main, origin/main, origin/HEAD) Merge branch 'feature/002' into 'main'
edfae73 update README.md by george
bdc4e57 Merge branch 'feature/001' into 'main'
8b82472 (origin/feature/001, feature/001) update README.md by jerry
03ff8ee update to v0.9.6
405836c update pom.xml.
a220f32 update src/main/java/com/neo/controller/HelloWorldController.java.
468a9f8 update pom.xml.
c0c23cf update pom.xml.
7bec6cc update pom.xml.
d333ea7 update src/test/java/com/neo/controller/HelloTests.java.
3eb437c v0.9.2
2e8ffde v0.9.1
c8afc09 bug fix
40e84e7 bug fix
47ce7a7 update to v0.9.0
4f0f467 Create Dockerfile
7ac25e9 (tag: v0.2) README.md
8dd6d08 v0.1.1
41bfb08 Bug fix...
72cb994 (tag: v0.1) v0.1
59c23b6 Initial Commit...
daddedc Initial commit
[root@ubuntu2004 spring-boot-helloWorld]#cat README.md 
# spring-boot-helloWorld
Spring Boot Example.

80/tcp
New feature by george

GitLab备份文档

关于GitLab的备份和恢复:
            https://docs.gitlab.com/ee/raketasks/backup_restore.html
            https://docs.gitlab.cn/ee/raketasks/backup_restore.html
中文文档
        https://docs.gitlab.cn/jh/