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

Problems with git-credentials-store for http credentials (introduced with fix for issue #20318 ?)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2008 64 Bit
    • Similar Issues:

      Description

      Several problems appeared with git credentials temp file and local config after updating git-client-plugin to 1.5 using URL credentials and/or Jenkins credential store.

      URL variant:

      Baue auf Master in workspace D:\Jenkins\jobs\Test\workspace
      Fetching changes from the remote Git repository
      Fetching upstream changes from http://user@host/git.git
      FATAL: Failed to fetch from http://user@host/git.git
      hudson.plugins.git.GitException: Failed to fetch from http://user@host/git.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
      at hudson.model.Run.execute(Run.java:1678)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress http://user@host/git.git +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: error: unknown option `store=D:Tomcat-Tempgit2760255774910937069.credentials'
      usage: git credential-store [options] <action>

      --file <path> fetch and store credentials in <path>

      error: unknown option `store=D:Tomcat-Tempgit2760255774910937069.credentials'
      usage: git credential-store [options] <action>

      --file <path> fetch and store credentials in <path>

      fatal: Authentication failed for 'http://user@host/git.git/'

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1098)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:984)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:68)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:217)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:223)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
      ... 10 more

      Jenkins credential store variant:

      Baue auf Master in workspace D:\Jenkins\jobs\Test\workspace
      Fetching changes from the remote Git repository
      Fetching upstream changes from http://user@host/git.git
      using .gitcredentials to set credentials
      FATAL: Failed to fetch from http://user@host/git.git
      hudson.plugins.git.GitException: Failed to fetch from http://user@host/git.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
      at hudson.model.Run.execute(Run.java:1678)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: hudson.plugins.git.GitException: Command "git config --local --remove-section credential.helper" returned status code 128:
      stdout:
      stderr: fatal: No such section!

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1098)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1075)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:930)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:993)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:68)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:217)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:223)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
      ... 10 more

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Confirmed resolved in git-client-plugin 1.6.2

          Show
          markewaite Mark Waite added a comment - Confirmed resolved in git-client-plugin 1.6.2
          Hide
          markewaite Mark Waite added a comment -

          Fix released in git-client-plugin 1.6.2

          Show
          markewaite Mark Waite added a comment - Fix released in git-client-plugin 1.6.2
          Hide
          kmart216 David Humeniuk added a comment -

          I'm still seeing this issue with git client plug-in 1.8.0. Here's the specific message:

          Started on Apr 14, 2014 12:00:10 PM
          Using strategy: Default
          [poll] Last Built Revision: Revision e28681748de2b634ab6cd68c55dc0ac349e6b872 (origin/master)
          using .gitcredentials to set credentials
          Could not remove the credential section from the git configuration
          FATAL: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255:
          stdout:
          stderr: error: could not lock config file .git/config: File exists

          hudson.util.IOException2: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255:
          stdout:
          stderr: error: could not lock config file .git/config: File exists

          at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459)
          at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
          at hudson.scm.SCM.poll(SCM.java:373)
          at hudson.model.AbstractProject._poll(AbstractProject.java:1567)
          at hudson.model.AbstractProject.poll(AbstractProject.java:1490)
          at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
          at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
          at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused by: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255:
          stdout:
          stderr: error: could not lock config file .git/config: File exists

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1245)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1142)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1091)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1082)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1739)
          at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:492)
          at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457)
          ... 13 more
          Done. Took 13 sec
          No changes

          Show
          kmart216 David Humeniuk added a comment - I'm still seeing this issue with git client plug-in 1.8.0. Here's the specific message: Started on Apr 14, 2014 12:00:10 PM Using strategy: Default [poll] Last Built Revision: Revision e28681748de2b634ab6cd68c55dc0ac349e6b872 (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: File exists hudson.util.IOException2: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: File exists at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1567) at hudson.model.AbstractProject.poll(AbstractProject.java:1490) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"C:\Users\IDTASK~1\AppData\Local\Temp\git4905599288427248808.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1245) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1091) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1082) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1739) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:492) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 13 sec No changes
          Hide
          markewaite Mark Waite added a comment -

          David Humeniuk I believe that stack trace is different than the other stack traces reported in this bug report. It seems to be similar to the stack trace in JENKINS-21914. In both cases, the problem is visible on Windows.

          Can you confirm that there are no "orphan" git.exe processes running on the machine which shows the problem?

          If there are orphan git processes, can you kill them and see if that resolves your issue?

          Show
          markewaite Mark Waite added a comment - David Humeniuk I believe that stack trace is different than the other stack traces reported in this bug report. It seems to be similar to the stack trace in JENKINS-21914 . In both cases, the problem is visible on Windows. Can you confirm that there are no "orphan" git.exe processes running on the machine which shows the problem? If there are orphan git processes, can you kill them and see if that resolves your issue?
          Hide
          kmart216 David Humeniuk added a comment -

          I'll report my status on the other issue since that seems to be more appropriate. Thanks.

          Show
          kmart216 David Humeniuk added a comment - I'll report my status on the other issue since that seems to be more appropriate. Thanks.

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              trexter Daniel Barth
            • Votes:
              34 Vote for this issue
              Watchers:
              55 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: