上一篇文件讲gitlab的时候没有将邮件的设置,这一章补上
gitlab支持两种发邮件sendmail和smtpsendmail方式
安装sendmail软件
yum -y install sendmail修改配置
cd /home/git/gitlab vi config/gitlab.yml修改
## Email settings # Uncomment and set to false if you need to disable email sending from GitLab (default: true) # email_enabled: true # Email address used in the "From" field in mails sent by GitLab email_from: a454213722@163.com email_display_name: GitLab email_reply_to: a454213722@163.comsmtp方式
cd /home/git/gitlab cp config/initializers/smtp_settings.rb.sample config/initializers/smtp_settings.rb修改,我配置的163的邮件地址
if Rails.env.production? Gitlab::Application.config.action_mailer.delivery_method = :smtp ActionMailer::Base.smtp_settings = { address: "smtp.163.com", port: 25, user_name: "a454213722@163.com", password: "XXXXXXX", domain: "163.com", authentication: :plain, enable_starttls_auto: true, openssl_verify_mode: 'none' # See ActionMailer documentation for other possible options } endvi config/gitlab.yml修改
## Email settings # Uncomment and set to false if you need to disable email sending from GitLab (default: true) # email_enabled: true # Email address used in the "From" field in mails sent by GitLab email_from: a454213722@163.com
gitlab 邮件设置
最新推荐文章于 2024-05-23 13:17:11 发布