mhudson.util.IOException2

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After a remote trigger the git init command failed with the following exception: Started on 5/03/2014 1:42:45 PM Using strategy: Default [poll] Last Built Revision: Revision 6c615c2d4570d1aa9288afd73588a7328073e832 (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': File exists ha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=hudson.util.IOException2: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': 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: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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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 init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1035) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 0.5 sec No changes The second time it failed with a similar exception: Started on 5/03/2014 1:46:38 PM Using strategy: Default [poll] Last Built Revision: Revision 6c615c2d4570d1aa9288afd73588a7328073e832 (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': File exists ha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=hudson.util.IOException2: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': 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: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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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 init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1035) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 0.31 sec No changes Both times the .git folder had been deleted before triggering.
    via by Marcus Bristol,
  • After a remote trigger the git init command failed with the following exception: Started on 5/03/2014 1:42:45 PM Using strategy: Default [poll] Last Built Revision: Revision 6c615c2d4570d1aa9288afd73588a7328073e832 (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': File exists ha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=hudson.util.IOException2: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': 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: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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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 init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/description' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/description': File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1035) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 0.5 sec No changes The second time it failed with a similar exception: Started on 5/03/2014 1:46:38 PM Using strategy: Default [poll] Last Built Revision: Revision 6c615c2d4570d1aa9288afd73588a7328073e832 (origin/master) using .gitcredentials to set credentials Could not remove the credential section from the git configuration FATAL: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': File exists ha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=hudson.util.IOException2: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': 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: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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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 init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1035) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more Done. Took 0.31 sec No changes Both times the .git folder had been deleted before triggering.
    via by Marcus Bristol,
  • A trigger from github results no builds being triggered. The following message is in the GitHib Hook Log. Started on Jan 21, 2014 2:57:32 PM Using strategy: Default [poll] Last Built Revision: Revision d93b3074fd2709faba94b5c06daf4d6346d1a13c (origin/develop) 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=\"C:\Users\bsimms\AppData\Local\Temp\git3856008338051386387.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=\"C:\Users\bsimms\AppData\Local\Temp\git3856008338051386387.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 com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98) 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.runWorker(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\bsimms\AppData\Local\Temp\git3856008338051386387.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.73 sec No changes
    via by William Simms,
  • When using https Git URLs which Username/Password credentials, remote polling is not working. {code} Started on Jan 24, 2014 11:04:31 AM Using strategy: Default [poll] Last Built Revision: Revision 97b787a21b9e0507d5591a8418a751b7df023751 (origin/master-7.5) 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/git4646876542745620308.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/git4646876542745620308.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:1584) at hudson.model.AbstractProject.poll(AbstractProject.java:1493) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:456) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:485) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=/tmp/git4646876542745620308.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:1097) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1074) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1070) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:971) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:928) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1449) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 12 more Done. Took 0.77 sec No changes {code} The "Force polling using workspace" extension can be used as a workaround.
    via by Daniel Spilker,
  • When configuring a Git URL with credentials, like "http(s)://user:password@server/path/to/repo.git", and explicitly selecting a single branch to build, the polling fails with 401 error: Here is the stacktrace from scm-polling.log: hudson.util.IOException2: Failed to connect to http://user@localhost:8888/git/xxx.git (status = 401) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:458) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) at hudson.scm.SCM.poll(SCM.java:373) at hudson.model.AbstractProject._poll(AbstractProject.java:1415) at hudson.model.AbstractProject.poll(AbstractProject.java:1335) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) 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:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: hudson.plugins.git.GitException: Failed to connect to http://user@localhost:8888/git/xxx.git (status = 401) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1437) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getURLWithCrendentials(CliGitAPIImpl.java:1379) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1294) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:488) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:456) ... 13 more The problem is that the "fast remote polling" discards the in-URL password ("URIish.toString()"): https://github.com/jenkinsci/git-plugin/blob/f6d42c4e7edb102d3330af5ca66a7f5809d1a48e/src/main/java/hudson/plugins/git/GitSCM.java#L488 I've verified that calling "toPrivateString()" there is enough to fix the bug. That said, it might be better/cleaner to extend the GitClient API with a "getHeadRev(URIish, String)", just like there is a "fetch(URIish, List<RefSpec>)" method for instance, and make the call to "toPrivateString" a bit deeper, where the password is actually required.
    via by Thomas de Grenier de Latour,
  • I haven't yet seen this come up when a build checks out code from Github, but it does happen intermittently when Jenkins polls Github for changes. I've pasted the text that appears on the "Git Polling Log" page at the end of this description. Are there any things I can do to get more and/or better output to help with debugging? Thank you. {noformat} Started on Feb 21, 2014 11:09:10 AM Using strategy: Default [poll] Last Built Revision: Revision 4e9e870ddaabd828a530eb48669fe548e63f3ed2 (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=\"C:\Windows\TEMP\git4966117369976036349.credentials\"" returned status code 255: stdout: stderr: error: could not lock config file .git/config: File exists hudson.util.IOException2: hudson.plugins.git.GitException: Command "git config --local credential.helper store --file=\"C:\Windows\TEMP\git4966117369976036349.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:457) 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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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:\Windows\TEMP\git4966117369976036349.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:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1039) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:487) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:455) ... 13 more Done. Took 0.82 sec No changes {noformat}
    via by cswarren,
    • mhudson.util.IOException2: hudson.plugins.git.GitException: Command "git init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': 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: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(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(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 init" returned status code 128: stdout: stderr: fatal: cannot copy 'C:\Program Files\Git/share/git-core/templates/hooks/post-update.sample' to 'C:/DOCUME~1/!SYSCA~1/LOCALS~1/Temp/.git/hooks/post-update.sample': File exists at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1173) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1150) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1146) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1142) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1035) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:988) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:979) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1526) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:489) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457) ... 13 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2 more bugmates