hudson.plugins.git.GitException

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.

  • We periodically get Jenkins test failures, because GitPublisher is not able to push the passing build's tag to github. From time to time when github rejects the connection and causes the push to fail. A subsequent rebuild tends to go through. It might be nice to have an option to allow for retrying a push after some amount of delay. Here is an example of a failed push. <pre> Pushing tag ci_157 to repo origin ERROR: Failed to push tag ci_157 to origin hudson.plugins.git.GitException: Command "git push origin ci_157" returned status code 128: stdout: stderr: ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:790) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:303) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:265) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:265) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Build step 'Git Publisher' changed build result to FAILURE Build step 'Git Publisher' marked build as failure </pre> A manual run a few minutes after this failure passes (on the same jenkins server) <pre> Pushing tag ci_158 to repo origin Email was triggered for: Success </pre>
    via by Zev Blut,
  • We periodically get Jenkins test failures, because GitPublisher is not able to push the passing build's tag to github. From time to time when github rejects the connection and causes the push to fail. A subsequent rebuild tends to go through. It might be nice to have an option to allow for retrying a push after some amount of delay. Here is an example of a failed push. <pre> Pushing tag ci_157 to repo origin ERROR: Failed to push tag ci_157 to origin hudson.plugins.git.GitException: Command "git push origin ci_157" returned status code 128: stdout: stderr: ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:790) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:303) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:265) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:265) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Build step 'Git Publisher' changed build result to FAILURE Build step 'Git Publisher' marked build as failure </pre> A manual run a few minutes after this failure passes (on the same jenkins server) <pre> Pushing tag ci_158 to repo origin Email was triggered for: Success </pre>
    via by Zev Blut,
  • cloudbees prebuild merge no longer works
    via Stack Overflow by user3557614
    ,
  • It seems that the GIT-Publisher does not use those credentials that are set for the repo. Checkout/Clone at the beginning of a job works fine and uses the set credentials. {code} Fetching changes from the remote Git repository Fetching upstream changes from git@gi-server.tld/project.git using GIT_SSH to set credentials WRITE permissions for gitlab Checking out Revision XXXX (origin/SOME_BRANCH) {code} As soon as I want the job to push a tag with GIT-Publisher, it fails since it does not use those credentials. {code} [Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: true) Run condition [Boolean condition] enabling perform for step [Git Publisher] Pushing tag job-name-release-296 to repo origin ERROR: Failed to push tag job-name-release-296 to origin hudson.plugins.git.GitException: Command "git push git@git-server.tld/project.git job-name-release-296" returned status code 128: stdout: stderr: Access denied. fatal: The remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:985) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1123) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1135) at hudson.plugins.git.GitAPI.push(GitAPI.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Thread.java:679) Build step 'Flexible publish' changed build result to FAILURE {code} This issue, together with JENKINS-21110 renders the GIT-Publisher rather unusable.
    via by Udo Waechter,
  • It seems that the GIT-Publisher does not use those credentials that are set for the repo. Checkout/Clone at the beginning of a job works fine and uses the set credentials. {code} Fetching changes from the remote Git repository Fetching upstream changes from git@gi-server.tld/project.git using GIT_SSH to set credentials WRITE permissions for gitlab Checking out Revision XXXX (origin/SOME_BRANCH) {code} As soon as I want the job to push a tag with GIT-Publisher, it fails since it does not use those credentials. {code} [Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: true) Run condition [Boolean condition] enabling perform for step [Git Publisher] Pushing tag job-name-release-296 to repo origin ERROR: Failed to push tag job-name-release-296 to origin hudson.plugins.git.GitException: Command "git push git@git-server.tld/project.git job-name-release-296" returned status code 128: stdout: stderr: Access denied. fatal: The remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:985) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1123) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1135) at hudson.plugins.git.GitAPI.push(GitAPI.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Thread.java:679) Build step 'Flexible publish' changed build result to FAILURE {code} This issue, together with JENKINS-21110 renders the GIT-Publisher rather unusable.
    via by Udo Waechter,
  • FlightGear - Flight Simulator / Mailing Lists
    via by Unknown author,
  • Used to work on git 2.2.1. After upgrading to 2.2.7, it cannot work on Linux slave. But can work on windows slave. Errors from polling log: Started on Oct 21, 2014 10:31:00 PM Polling SCM changes on VM-Platuypus-Build-10.110.61.85-PDK Using strategy: Default [poll] Last Built Revision: Revision cd2cd96d9ff5f3ca90ead6178f299a873978a44c (origin/master) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repositories > git config remote.origin.url ssh://bmcdiags@10.110.61.117:30000/platypus.git # timeout=10 Fetching upstream changes from ssh://bmcdiags@10.110.61.117:30000/platypus.git > git --version # timeout=10 > git fetch --tags ssh://bmcdiags@10.110.61.117:30000/platypus.git +refs/heads/*:refs/remotes/origin/* # timeout=20 FATAL: hudson.plugins.git.GitException: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:475) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1449) at hudson.model.AbstractProject._poll(AbstractProject.java:1420) at hudson.model.AbstractProject.poll(AbstractProject.java:1331) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:477) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:506) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(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: Failed to fetch from ssh://bmcdiags@10.110.61.117:30000/platypus.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:647) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:554) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:473) ... 13 more Caused by: hudson.plugins.git.GitException: Command "git fetch --tags ssh://bmcdiags@10.110.61.117:30000/platypus.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: error: cannot run ssh: No such file or directory fatal: unable to fork at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1435) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1223) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Done. Took 0.15 sec No changes
    via by sharon xia,
    • hudson.plugins.git.GitException: Command "git push origin ci_157" returned status code 128: stdout: stderr: ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:790) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:303) at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:265) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:265) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733) at hudson.model.Run.execute(Run.java:1593) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)

    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