【发布时间】: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