CI / CD Manual (d) under the traditional cloud environment configuration gitlab

Version control (code management) tool
1 CVS
2 centralized version control system SVN
is only a remote code library, all programmers need to push things to the code on the server
3 Gitlab distributed version control system
has a remote code libraries, each programmers can be cloned from a remote native code libraries, offline work, of course, every programmer has defined access can only have permission code portions clone

Installation Configuration
download gitlab-ce uploaded to the server
yum the install gitlab-ce--Y-ce.0.el7.x86_64.rpm 10.8.7
Vim /etc/gitlab/gitlab.rb
external_url ' http://192.168.1.14 ' # external access address
gitlab_rails [ 'smtp_enable'] = true # configure mail service purpose is to let users forget their password via email to reset your password
gitlab_rails [ 'smtp_address'] = "smtp.163.com"
gitlab_rails [ 'smtp_port'] 25 =
gitlab_rails [ 'smtp_user_name'] = "[email protected]"
gitlab_rails [ 'smtp_password The'] = "AAAAAAAA"
gitlab_rails [ 'smtp_authentication'] = "Login"
gitlab_rails [ 'smtp_enable_starttls_auto'] = to true
gitlab_rails [ 'smtp_tls'] to false =
gitlab_rails [ 'gitlab_email_from'] = '@ 163 dongyali521521.com'
gitlab_rails['smtp_domain'] = "163.com"
User [ 'git_user_email'] = "[email protected]"
gitlab the reconfigure-CTL
gitlab-CTL Status
grep "^ [AZ]" /etc/gitlab/gitlab.rb
http://192.168.1.14
first time login You need to configure the password to the root

Basic operation
closed account registration function:
Click the wrench icon --- setting --- sign up restrictions --- cancel sing-up enabled
New User:
Click the wrench icon --- new user, mailbox required for resetting password
new group:
click the wrench icon --- new group, created after the group click Add user (s) to the group , add users to groups and grant the appropriate permissions
administrators group belongs to each default
user permissions there are five types: guest, reporter, developer, maintainer, owner
New project:
click the wrench icon --- new project, the project path need to select the root or a group

Http clone with the way the code (requires a user name and password)
yum -y install git
View cloning address on gitlab:
Project your Project --- --- --- Project name http way
git clone http://192.168.1.14/group1 /project1.git
cd project1 /
vim index.html
git the Add.
git config --global user.name "user1"
git config --global user.email [email protected]
git the commit -m "xxxx"
git config --global the Simple push.default
git the Push

Free miquelon manner using ssh codes
at the client to generate git root user Key
CD / root
ssh-keygen
CAT /root/.ssh/id_rsa.pub
arranging the pub-key generated on gitlab:
Click projects --- your projects --- projects name --- gear icon Settings
--- Repository Deploy Keys --- --- --- click enter key values Write access allowed
cloned before rm -rf project1 / # delete
git clone [email protected] .1.15: group1 / project1.git (to enter the first pull Yes)
CD Project1 /
Vim index.html
. the Add Git
Git the commit -m "11111"
Git Push

Guess you like

Origin blog.51cto.com/dongdong/2423427