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

status code 255 error: could not lock config file .git/config: No such file or directory

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None
    • Scientific Linux 6.3
      git 1.8.5.1
      Jenkins 1.5.32

      Since the last update of the Git plugin with the new credential feature, an error appeared on the project configuration page.

      "Failed to connect to repository : Command "git config --local credential.helper store --file=\"/tmp/git1652196526881950884.credentials\"" returned status code 255:
      stdout:
      stderr: error: could not lock config file .git/config: No such file or directory"

      I configure the credential with an user authorized to clone and push repository on our platform, and configure project to use it but this error is still present.
      I attach two file to this Issue, the first is the error message on the configuration page. The second is the build log when the credential feature is up.

      Before this version, we used .netrc file to set credentials for clone/fetch repository with git on jenkins(This feature still workingfor now).

      However, this feature of credential gestion by jenkins is very interesting for us.

          [JENKINS-21376] status code 255 error: could not lock config file .git/config: No such file or directory

          As I see, "/bin/echo " is cause of this issue

          Vladimir Burdukov added a comment - As I see, "/bin/echo " is cause of this issue

          Looks to be a duplicate of JENKINS-21016.

          See https://issues.jenkins-ci.org/browse/JENKINS-21016#comment-192971, the latest version of the plugin in github has the /bin/echo fix. The error in the config screen can be ignored.

          Peter Phillips added a comment - Looks to be a duplicate of JENKINS-21016 . See https://issues.jenkins-ci.org/browse/JENKINS-21016#comment-192971 , the latest version of the plugin in github has the /bin/echo fix. The error in the config screen can be ignored.

          Gabriel Guzman added a comment - - edited

          I'm seeing this same problem, but I'm not clear on weather the polling is completing properly or not as I see a "No Changes" at the end of the polling run. However, I have committed and pushed a change. This is on CentOS w/Jenkins ver. 1.548 and Git Plugin v. 2.0.1

          Error log below:

          Started on Jan 22, 2014 9:53:00 AM
          Using strategy: Default
          [poll] Last Built Revision: Revision 16749e04841fba97094ac01fea5f75caa7a4039e (origin/master)
          using .gitcredentials to set credentials
          Could not remove the credential section from the git configuration
          FATAL: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"/tmp/git7530262695010143125.credentials\"" returned status code 255:
          stdout: 
          stderr: error: could not lock config file .git/config: No such file or directory
          
          hudson.util.IOException2: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"/tmp/git7530262695010143125.credentials\"" returned status code 255:
          stdout: 
          stderr: error: could not lock config file .git/config: No such file or directory
          
          	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:1581)
          	at hudson.model.AbstractProject.poll(AbstractProject.java:1490)
          	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:462)
          	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:491)
          	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          	at java.lang.Thread.run(Thread.java:636)
          Caused by: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"/tmp/git7530262695010143125.credentials\"" returned status code 255:
          stdout: 
          stderr: error: could not lock config file .git/config: No such file or directory
          
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1086)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1063)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:914)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:964)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:922)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1438)
          	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489)
          	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457)
          	... 13 more
          Done. Took 0.14 sec
          No changes
          

          Gabriel Guzman added a comment - - edited I'm seeing this same problem, but I'm not clear on weather the polling is completing properly or not as I see a "No Changes" at the end of the polling run. However, I have committed and pushed a change. This is on CentOS w/Jenkins ver. 1.548 and Git Plugin v. 2.0.1 Error log below: Started on Jan 22, 2014 9:53:00 AM Using strategy: Default [poll] Last Built Revision: Revision 16749e04841fba97094ac01fea5f75caa7a4039e (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\" /tmp/git7530262695010143125.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: No such file or directory hudson.util.IOException2: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\" /tmp/git7530262695010143125.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: No such file or directory 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:1581) at hudson.model.AbstractProject.poll(AbstractProject.java:1490) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:462) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:491) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang. Thread .run( Thread .java:636) Caused by: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\" /tmp/git7530262695010143125.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: No such file or directory at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1086) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1063) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:914) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:964) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:922) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1438) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 0.14 sec No changes

          And, I can confirm that the suggestions in JENKINS-21016 work for me for solving the issue. In particular: "Force polling using workspace" Allows my poll to suceed and the build to be triggered automatically.

          Gabriel Guzman added a comment - And, I can confirm that the suggestions in JENKINS-21016 work for me for solving the issue. In particular: "Force polling using workspace" Allows my poll to suceed and the build to be triggered automatically.

          Mark Waite added a comment -

          Fix released in git-client-plugin 1.6.2

          Mark Waite added a comment - Fix released in git-client-plugin 1.6.2

            ndeloof Nicolas De Loof
            gpfeiffer Guillaume Pfeiffer
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: