配置文件路径:sudo nano /etc/gitlab/gitlab.rb
通过ctrl+w 搜索到对应关键词,修改为以下这样即可: gitlab_rails[‘gitlab_email_from’] = ‘gitlab@example.com’ gitlab_rails[‘gitlab_email_display_name’] = ‘Gitlab’ gitlab_rails[‘smtp_enable’] = true gitlab_rails[‘smtp_address’] = “smtp.exmail.qq.com” gitlab_rails[‘smtp_port’] = 465 gitlab_rails[‘smtp_user_name’] = “gitlab@example.com” gitlab_rails[‘smtp_password’] = “your_password” gitlab_rails[‘smtp_domain’] = “exmail.qq.com” gitlab_rails[‘smtp_authentication’] = “login” gitlab_rails[‘smtp_enable_starttls_auto’] = true gitlab_rails[‘smtp_tls’] = true |
配置完成后,执行以下命令:
gitlab-ctl reconfigure gitlab-ctl restart |