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

Automatically set user.name and user.email in ~/.gitconfig

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • git-plugin
    • None
    • Platform: All, OS: All

    Description

      tagging fails if there's no ~/.gitconfig, and you get the following error:

      ------------------
      [workspace] $ git tag -a -f -m "Hudson Build #34" hudson-JAMCircle-34
      FATAL: Could not apply tag hudson-JAMCircle-34
      hudson.plugins.git.GitException: Could not apply tag hudson-JAMCircle-34
      at hudson.plugins.git.GitAPI.tag(GitAPI.java:265)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:560)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:521)
      at hudson.FilePath.act(FilePath.java:635)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:521)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:830)
      at
      hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266)
      at hudson.model.Run.run(Run.java:927)
      at hudson.model.Build.run(Build.java:112)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:119)
      Caused by: hudson.plugins.git.GitException: Error performing git tag -a -f -m
      Hudson Build #34 hudson-JAMCircle-34
      at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:302)
      at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:276)
      at hudson.plugins.git.GitAPI.tag(GitAPI.java:263)
      ... 11 more
      Caused by: hudson.plugins.git.GitException: Command 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.
      ------------------

      git plugin should recover from this error by setting the user-wide name
      information automatically.

      Attachments

        Issue Links

          Activity

            kohsuke Kohsuke Kawaguchi created issue -
            plentz Diego Plentz added a comment -

            Duplicate of 2754

                • This issue has been marked as a duplicate of 2754 ***
            plentz Diego Plentz added a comment - Duplicate of 2754 This issue has been marked as a duplicate of 2754 ***
            plentz Diego Plentz made changes -
            Field Original Value New Value
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            plentz Diego Plentz made changes -
            Link This issue duplicates JENKINS-2754 [ JENKINS-2754 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 133947 ] JNJira + In-Review [ 202511 ]

            People

              jbq jbq
              kohsuke Kohsuke Kawaguchi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: