
二)新建組

三)新建用戶


給剛剛注冊的用戶,設置密碼


將用戶加入到指定組

四)新建項目
更改域名
[root@server01 gitlab]# vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
production: &base
#
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
production: &base
#
# 1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: git.pet.com
port: 80
https: false
[root@server01 gitlab]# gitlab-ctl reconfigure
[root@server01 gitlab]# gitlab-ctl restart


第二部分:客戶端操作
添加key密鑰到gitlab服務器
[root@proxy01 ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
7f:81:b9:df:32:d5:4f:00:98:3b:ca:f1:5c:fa:2a:4f root@proxy01
The key's randomart image is:
+--[ RSA 2048]----+
| o |
| o . |
| . . |
| . oo. . |
| .S=o+. o |
| o.+. .. o|
| E... ..|
| .. o+. .|
| oo..o. |
+-----------------+
[root@proxy01 ~]# cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8omQ0y3qbH7BNHskbdSgvFqurmHgGJDcvxI69X0pl9U+TQ69XkbzhfAceUFZwrL/D0/ON9nSeqzfzgaPpgPxmaCyKtJ+pMdRjZVwZa5dwl7IobUkpHlSJDkOyvVuOIvmR2Mha8XJyzA0yBOI+to1qHNdKx++Ihu2PWwN/+x0ZufBjgigDuLD/ILIypGxSN53doxqlk4SiwHwtiQhC7rOqXhzivtmV3Vjz4dQqo9s4mOqYWWnpoGb86phTFeuipHAyNmsYoWucWyDBroV7MnxHkLiBAPqFFR5W6lWu6CbRLq9Ii3FG+G/cLVztMpZ/EheubUsU1F3R2v1RT2mqjrMZQ== root@proxy01

[root@proxy01 ~]# yum -y install git
客戶端測試獲取git倉庫
[root@proxy01 ~]# git clone git@git.pet.com:pet_dev/new_pet.git
Initialized empty Git repository in /root/new_pet/.git/
The authenticity of host 'git.pet.com (10.100.100.104)' can't be established.
RSA key fingerprint is dd:b4:7e:56:49:2a:69:40:ab:c3:2d:60:c3:26:00:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.pet.com,10.100.100.104' (RSA) to the list of known hosts.
warning: You appear to have cloned an empty repository.
[root@proxy01 ~]# git config --global user.name "xionghaihua"
[root@proxy01 ~]# git config --global user.email "xionghaihua@91als.com.cn"
[root@proxy01 ~]# cd new_pet/
[root@proxy01 new_pet]# touch README.md
[root@proxy01 new_pet]# git add .
[root@proxy01 new_pet]# git commit . -m "add README"
[master (root-commit) e596cf3] add README
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
[root@proxy01 new_pet]# git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 217 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@git.pet.com:pet_dev/new_pet.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
- 第一部分:Git的基本操作
- 第一章:git軟件的安裝
- 第一節:在centos6.8上安裝git-2.3
- 第二節:在windows上安裝git-bash和TortoiseGit軟件
- 第二章: Git的基本概念
- 第一節:git的基本操作
- 第二節:git的深入理解(內部運行機制)
- 第三章:git的文件管理
- 第一節:文件的添加及提交
- 第二節:文件的刪除、回退等
- 第三節:忽略指定格式的文件
- 第四節:撤銷本地倉庫的修改
- 第四章:git的commit對象深入理解
- 第一節:查看提交歷史(git log)
- 第二節:提交查找(git grep)
- 第三節:git版本庫回退
- 第五章: Git分支管理
- 第一節:分支的概念及基本使用
- 第二節:Git分支管理策略
- 第三節:Git分支合并
- 第四節:推送本地分支到遠程分支
- 第七章: Git常用命令詳解
- 第一節:git fetch命令
- 第二節:git pull命令
- 第三節:git push命令
- 第四節: git merge命令
- 第五節:git rebase命令
- 第八章:遠程倉庫管理
- 第二部分: gitlab版本控制系統
- 第一節:"遠程倉庫”版本回退解決方案
- 第二節:遠程分支和本地分支
- 第九章:Git沖突解決
- 第十章:客戶端操作
- 第十章:git常規操作
- 第一章:安裝gitlab服務器
- 第一節:在centos系統上安裝
- 第二章:配置GitLab服務器
- 第一節:關閉gitlab注冊功能
- 第二節:在gitlab上創建項目、組、用戶
- 第三節:漢化gitlab
- 第四節:gitlab配置郵箱通知
- 第五節:gitlab配置https訪問
- 第三章:使用過程常見的故障
- 第三部分: gogs版本控制系統
- 第一章:在centos6上基于二進制包安裝gogs軟件
- 第二章:gogs服務器的配置
- 第一節:gogs服務器上創建項目、用戶
- 第二節:nginx反代gogs,通過https
- 第三節:gogs啟動腳本
- 第四節:git保存密碼到本地
- 第三章:gogs服務器的備份和恢復
- 第一節:gogs備份操作