Adi*_*raa 5 git email notifications smtp gitlab
我只是在我的专用服务器上设置gitlab,作为管理员我创建了一个新用户,他通常应该收到一封带有密码的电子邮件,但他没有.
我想知道的是如何配置电子邮件通知(使用SMTP).
PS:我根本不熟悉Ruby环境.
谢谢.
更新:它现在有效,我只是忘了在设置gitlab时安装postfix
更新2:最后我选择使用SMTP帐户发送电子邮件通知:
就个人而言,我有一个Amazone帐户(你可以使用Gmail):
1)在/home/git/gitlab/config/envirenoments/production.rb中评论此行:
#config.action_mailer.delivery_method = :sendmail
Run Code Online (Sandbox Code Playgroud)
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
}
Run Code Online (Sandbox Code Playgroud)
谢谢,我希望它会帮助你.
最后,我选择使用SMTP帐户发送电子邮件通知:
就个人而言,我有一个Amazone帐户(你可以使用Gmail):
1)在/home/git/gitlab/config/envirenoments/production.rb中评论此行:
#config.action_mailer.delivery_method = :sendmail
Run Code Online (Sandbox Code Playgroud)
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 }
Run Code Online (Sandbox Code Playgroud)
谢谢,我希望它会帮助你.
归档时间: |
|
查看次数: |
13448 次 |
最近记录: |