Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10272

Global git config name and email address settings not used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      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.
      

        Attachments

          Activity

          Hide
          oldelvet Richard Mortimer added a comment -

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

          Show
          oldelvet Richard Mortimer added a comment - 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-9702 in 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.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/plugins/git/GitSCM.java
          http://jenkins-ci.org/commit/git-plugin/421d83843c964669cf436c0c170c935dffe0aaac
          Log:
          Merge pull request #37 from oldelvet/jenkins-10272

          [FIXED JENKINS-10272] Global git config name and email address settings not used.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/git/GitSCM.java http://jenkins-ci.org/commit/git-plugin/421d83843c964669cf436c0c170c935dffe0aaac Log: Merge pull request #37 from oldelvet/jenkins-10272 [FIXED JENKINS-10272] Global git config name and email address settings not used.

            People

            • Assignee:
              oldelvet Richard Mortimer
              Reporter:
              oldelvet Richard Mortimer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: