-
Bug
-
Resolution: Fixed
-
Minor
-
None
We randomly get `GitException`s, caused by a `java.io.IOException` when running `CliGitAPIImpl.createSshKeyFile` (see stacktrace below). This happens randomly on different nodes (i.e. it does not always happen, and not always on the same node).
In the job configuration, we simply tell Jenkins to use the corresponding git credentials. The error seems to mean that sometimes, getting the credentials fails for some reason. We thought about a permission problem, but the thing is that it sometimes works without changing the node at all.
09:01:44 > git --version # timeout=10
09:01:44 using GIT_SSH to set credentials Gitmirror key
09:01:44 ERROR: Error cloning remote repo 'origin'
09:01:44 hudson.plugins.git.GitException: Failed to setup credentials
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1491)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
09:01:44 at hudson.remoting.UserRequest.perform(UserRequest.java:153)
09:01:44 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
09:01:44 at hudson.remoting.Request$2.run(Request.java:332)
09:01:44 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
09:01:44 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
09:01:44 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
09:01:44 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
09:01:44 at java.lang.Thread.run(Thread.java:745)
09:01:44 at ......remote call to tmp-build-debian-jessie(Native Method)
09:01:44 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
09:01:44 at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
09:01:44 at hudson.remoting.Channel.call(Channel.java:781)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
09:01:44 at sun.reflect.GeneratedMethodAccessor416.invoke(Unknown Source)
09:01:44 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
09:01:44 at java.lang.reflect.Method.invoke(Method.java:606)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
09:01:44 at com.sun.proxy.$Proxy80.execute(Unknown Source)
09:01:44 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1054)
09:01:44 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
09:01:44 at hudson.scm.SCM.checkout(SCM.java:495)
09:01:44 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
09:01:44 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
09:01:44 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
09:01:44 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
09:01:44 at hudson.model.Run.execute(Run.java:1720)
09:01:44 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
09:01:44 at hudson.model.ResourceController.execute(ResourceController.java:98)
09:01:44 at hudson.model.Executor.run(Executor.java:410)
09:01:44 Caused by: java.io.IOException: No such file or directory
09:01:44 at java.io.UnixFileSystem.createFileExclusively(Native Method)
09:01:44 at java.io.File.createTempFile(File.java:2001)
09:01:44 at java.io.File.createTempFile(File.java:2047)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1501)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1430)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
09:01:44 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
09:01:44 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
09:01:44 at hudson.remoting.UserRequest.perform(UserRequest.java:153)
09:01:44 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
09:01:44 at hudson.remoting.Request$2.run(Request.java:332)
09:01:44 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
09:01:44 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
09:01:44 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
09:01:44 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
09:01:44 at java.lang.Thread.run(Thread.java:745)
09:01:44 ERROR: null
09:01:44 Retrying after 10 seconds
09:01:54 Wiping out workspace first.