开发者

Hudson git failed to send out build failure email to

开发者 https://www.devze.com 2023-01-16 14:07 出处:网络
How to configure the git user.name to enable Hudson send out email to the user who commit code? I just follow the standard way to configure the git user.name with "User Name (userid)", see b

How to configure the git user.name to enable Hudson send out email to the user who commit code?

I just follow the standard way to configure the git user.name with "User Name (userid)", see below.

git config --global user.name "Euler XXXX (euler)"

git config --global user.email "euler.xxxx@server.com"

Then I commit the code to git repository, which trigger Hudson build. But it was failed to send out the email to me with email euler.xxxx@server.com.

See the Hudson log as below:

...
[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开发者_如何学Python 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.

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.


It looks like the guy who wrote this blog post managed to fix the problem you are having. Although it doesn't look like it has made it into the plugin, so you have to compile the plugin yourself.


You need to visit the "People" page (/people/) and add an email address for this user (at /user/{username}). The git config email address gets ignored by the git plugin.


git config --global writes to global ~/.gitconfig file.

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.

Check and make sure of the user home actually involved in that Hudson job execution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号