Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hudson git failed to send out build failure email to

Tags:

git

hudson

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 "[email protected]"

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 [email protected].

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 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.

like image 327
user451784 Avatar asked Sep 19 '10 07:09

user451784


2 Answers

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.

like image 166
Joel Pearson Avatar answered Oct 04 '22 15:10

Joel Pearson


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.

like image 27
tom Avatar answered Oct 04 '22 15:10

tom