Some small operations of gitlab

Keywords: GitLab vim shell PostgreSQL

1, Install gitlab

Reference blog Gitlab installation and application of continuous integration Install gitlab, and perform the basic operation of the third and remote library

2, Mail verification registration

Email reminders can be used to register users and need to be verified by email. They will also be reminded when gitlab uploads code or downloads

[root@gitlab /]# vim /etc/gitlab/gitlab.rb
..................
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "848369866@qq.com"
gitlab_rails['smtp_password'] = "wbwkirmyqzmzbfcf"              # Here is the login authorization code of qq email, which can be viewed according to the picture below
gitlab_rails['smtp_domain'] = "qq.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
..................
user['git_user_email'] = "848369866@qq.com"
..................
gitlab_rails['gitlab_email_from'] = '848369866@qq.com'
[root@gitlab /]# gitlab-ctl reconfigure                # Reconfiguration
[root@gitlab /]# gitlab-ctl restart           # Restart service to take effect

View email login authorization code



#Test mail delivery
[root@gitlab /]# gitlab-rails console
-------------------------------------------------------------------------------------
 GitLab:       11.9.8 (48528bc)
 GitLab Shell: 8.7.1
 postgresql:   9.6.11
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.0.7.1)
irb(main):001:0> Notify.test_email('848369866@qq.com','this is title','hello word').deliver_now
Notify#test_email: processed outbound mail in 142.7ms

As you can see, you have received the test information

Use root user to log in to gitlab web side for setting


Let's log out and register a user to verify




After clicking the verification link of the email, you can log in to gitlab directly

3, Turn off automatic registration

Because if we use it internally, we don't need users to register themselves. It's all the operation and maintenance personnel who assign users


Note: pull to the bottom of the page and click save changes. Remember to save
Note: pull to the bottom of the page and click save changes. Remember to save
Note: pull to the bottom of the page and click save changes. Remember to save
Important things are to be repeated for 3 times!!!


————Additional————



————Attach end————






Posted by Megalink on Thu, 19 Mar 2020 10:53:41 -0700