First, install gitlab
Reference Bowen continuous integration and application of Gitlab mounting installation gitlab, for the three basic operations of the distal end of the library over to
Second, verify the e-mail registration
E-mail alert messages need to be validated when available to registered users, when gitlab upload or download the code will also remind
[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'] = "[email protected]"
gitlab_rails['smtp_password'] = "wbwkirmyqzmzbfcf" # 此处填写的是qq邮箱的登录授权码,可根据下方图片查看
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'] = "[email protected]"
..................
gitlab_rails['gitlab_email_from'] = '[email protected]'
[root@gitlab /]# gitlab-ctl reconfigure # 重新配置
[root@gitlab /]# gitlab-ctl restart # 重启服务使之生效
Check the mailbox login authorization code
#测试邮件发送
[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('[email protected]','this is title','hello word').deliver_now
Notify#test_email: processed outbound mail in 142.7ms
It can be seen already received a test message
logged in as root to the end gitlab web set
us out, register a user to test
after you click on the verification link in the email, you can log in directly gitlab
Third, turn off the automatic registration
Because our internal use if the user does not need to register themselves, operation and maintenance personnel are assigned to the user
Note: pull the bottom of the page click save changes, remember to save
Note: pull the bottom of the page click save changes, remember to save
Note: pull the bottom of the page click on save changes, remember to save
important things to say three times! ! !
Additional ----
---- ---- ---- Additional End