Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
The git global config name and email address settings are not used if project specific versions are not set.
Caused by: hudson.plugins.git.GitException: Error performing command: git tag -a -f -m Jenkins Build #8 jenkins-regress-8 Command "git tag -a -f -m Jenkins Build #8 jenkins-regress-8" returned status code 128: *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository.
The tests in GitSCM.java for the project local settings in getGitConfigEmailToUse() and getGitConfigNameToUse() do not take an empty string into account. It seems that the default setting for a new build configuration is to have empty strings for these so that means that the global settings are ignored.
There was a fix for
JENKINS-9702in revision 89e610b7 but this problem looks to have been present before then also.The fix is simple just use fixEmptyAndTrim on project local values before testing whether to fallback on the global setting. Pull request coming soon.