【问题标题】:GitLab email notification not workingGitLab 电子邮件通知不起作用
【发布时间】:2014-03-17 16:49:13
【问题描述】:

我刚刚在我的专用服务器上设置了 gitlab,作为管理员我创建了一个新用户,他通常应该会收到一封包含密码的电子邮件,但他没有。

我想知道的是如何配置邮件通知(使用 SMTP)。

PS:我对 Ruby 环境一点也不熟悉。

谢谢。

更新:现在可以了,我只是在设置 gitlab 时忘记安装 postfix

更新 2:最后我选择使用 SMTP 帐户发送电子邮件通知:

我个人有一个 Amazone 帐户(您可以使用 Gmail):

1) 在 /home/git/gitlab/config/envirenoments/production.rb 中注释这一行:

#config.action_mailer.delivery_method = :sendmail

2) 在结束标记之前添加这个(使用正确的凭据):

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
     :address => 'gmail.com', // Or an other SMTP provider 
     :port => 467, // Port depends on your provider
     :domain => 'gitlab.yourserver.com', // Your Gitlab main url
     :authentication => :plain,
     :user_name => 'your gmail id',
     :password => 'yourPassword',
     :enable_starttls_auto => true
 }

谢谢,希望对你有帮助。

【问题讨论】:

    标签: git email notifications smtp gitlab


    【解决方案1】:

    最后我选择使用 SMTP 帐户发送电子邮件通知:

    我个人有一个 Amazone 帐户(您可以使用 Gmail):

    1) 在 /home/git/gitlab/config/envirenoments/production.rb 中注释这一行:

    #config.action_mailer.delivery_method = :sendmail
    

    2) 在结束标记之前添加这个(使用正确的凭据):

    config.action_mailer.delivery_method = :smtp
    
    config.action_mailer.smtp_settings = {
         :address => 'gmail.com', # Or an other SMTP provider 
         :port => 467, # Port depends on your provider
         :domain => 'gitlab.yourserver.com', # Your Gitlab main url
         :authentication => :plain,
         :user_name => 'your gmail id',
         :password => 'yourPassword',
         :enable_starttls_auto => true  }
    

    谢谢,希望对你有帮助。

    【讨论】:

    • 您不能使用 Gmail,它有时不发送电子邮件(随机)
    【解决方案2】:

    请按照安装指南进行操作,其中包含设置电子邮件的说明。

    【讨论】:

    • 即使它工作了,最后安装的 postfix 已经删除了一些 plesk 包(我正在用 plesk 管理我的服务器),现在所有关于电子邮件、重定向、帐户的部分都不再工作了!
    • 我认为它是一个专用服务器,就像专用于 GitLab 一样。
    猜你喜欢
    • 2023-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多