Jenkins 电子邮件插件不会向破坏构建的用户发送电子邮件 [英] Jenkins email plugin doesn't send email to user who broke the build

查看:30
本文介绍了Jenkins 电子邮件插件不会向破坏构建的用户发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 Jenkins 设置为仅向使用 email-ext 插件破坏构建的用户发送电子邮件,但出现此错误:

<块引用>

不向未注册的用户 user@example.com 发送邮件,因为您的 SCM 声称这与您的安全领域无法识别的用户 IDJohn Smith"相关联;您可能需要更改 SCM 插件

我真的不明白这个错误是什么意思,是我们的 SCM 还是电子邮件插件的问题?这些电子邮件取自提交历史记录,我应该将它们注册到某个地方以便 Jenkins 开始工作吗?

参考,

如果这不起作用,请参阅https://stackoverflow.com/a/45353810/492336 用于另一种解决方案.

I've setup Jenkins to send emails only to users who broke the build using email-ext plugin, but I'm getting this error:

Not sending mail to unregistered user user@example.com because your SCM claimed this was associated with a user ID ‘John Smith' which your security realm does not recognize; you may need changes in your SCM plugin

I don't really understand what this error means, is the problem in our SCM, or in the email plugin? The emails are taken from the commit history, should I register them somewhere so Jenkins will start working?

For reference, this is the code around the error message in the plugin's source code:

                    } catch (UsernameNotFoundException x) {
                        if (SEND_TO_UNKNOWN_USERS) {
                            listener.getLogger().printf("Warning: %s is not a recognized user, but sending mail anyway%n", userAddress);
                        } else {
                            listener.getLogger().printf("Not sending mail to unregistered user %s because your SCM"
                    ........

How do I enable SEND_TO_UNKNOWN_USERS?

The error message is also mentioned in this bug report.

解决方案

For version V2.61 or above this can be configured via a radio button.

Go to

Manage Jenkins -> Configure System -> Extended E-mail Notification

and tick the radio button for Allow sending to unregistered users

Edit: If this does not work, see https://stackoverflow.com/a/45353810/492336 for another solution.

这篇关于Jenkins 电子邮件插件不会向破坏构建的用户发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆