[英]Hudson git failed to send out build failure email to
How to configure the git user.name to enable Hudson send out email to the user who commit code? 如何配置git user.name以启用Hudson向提交代码的用户发送电子邮件?
I just follow the standard way to configure the git user.name with "User Name (userid)", see below. 我只是按照标准方式配置git user.name和“User Name(userid)”,见下文。
git config --global user.name "Euler XXXX (euler)"
git config --global user.name“Euler XXXX(euler)”
git config --global user.email "euler.xxxx@server.com"
git config --global user.email“euler.xxxx@server.com”
Then I commit the code to git repository, which trigger Hudson build. 然后我将代码提交给git repository,它会触发Hudson构建。 But it was failed to send out the email to me with email
euler.xxxx@server.com
. 但它没有通过电子邮件
euler.xxxx@server.com
向我发送电子邮件。
See the Hudson log as below: 请参阅Hudson日志,如下所示:
...
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Sep 10 15:05:51 CST 2010
[INFO] Final Memory: 3M/74M
[INFO] ----
--------------------------------------------------------------------
**Failed to send e-mail to Euler XXXX (euler) because no e-mail address is known, and no default e-mail domain is configured**
...
In Hudson configuration, I configured " LDAP Email Lookup
", which provided by Hudson LDAP email plugin. 在Hudson配置中,我配置了“
LDAP Email Lookup
”,它由Hudson LDAP电子邮件插件提供。
While if I configure the user.name
with the userid
, which is userid
in my LDAP server, then the Hudson build can find email address. 而如果我配置
user.name
与userid
,这是userid
在我的LDAP服务器,那么哈德森构建能找到的电子邮件地址。
You need to visit the "People" page (/people/) and add an email address for this user (at /user/{username}). 您需要访问“人员”页面(/ people /)并为该用户添加电子邮件地址(在/ user / {username})。 The git config email address gets ignored by the git plugin.
git配置电子邮件地址被git插件忽略。
git config --global
writes to global ~/.gitconfig file . git config --global
写入全局〜/ .gitconfig文件 。
Your problem comes from the fact that ~
used when you typed the git config
is not the same than the ~
used by the user actually executing the Hudson job. 你的问题来自于一个事实,即
~
使用时您键入的git config
不低于同~
使用的实际执行哈德森作业的用户。
Check and make sure of the user home actually involved in that Hudson job execution. 检查并确保实际涉及Hudson作业执行的用户主页。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.