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

Jenkins JIRA | Zev Blut | 3 years ago
  1. 0

    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>

    Jenkins JIRA | 3 years ago | Zev Blut
    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
  2. 0

    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>

    Jenkins JIRA | 3 years ago | Zev Blut
    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
  3. 0

    Error in build for Google App Engine Release pipeline

    Stack Overflow | 2 years ago | x10s
    hudson.plugins.git.GitException: Command "git push <a href="https://source.developers.google.com/id/cq1CyBqGH6A" rel="nofollow">https://source.developers.google.com/id/cq1CyBqGH6A</a> refs/google/deployments/<strong><em>project-id</em></strong>/1/6568187336327168/20140714T184500Z" returned status code 128: stdout: stderr: fatal: <a href="https://source.developers.google.com/id/cq1CyBqGH6A/info/refs" rel="nofollow">https://source.developers.google.com/id/cq1CyBqGH6A/info/refs</a> not found: did you run git update-server-info on the server?</p> </blockquote> <pre><code>at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1325)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    cloudbees prebuild merge no longer works

    Stack Overflow | 3 years ago | user3557614
    hudson.plugins.git.GitException: Command "git push git@bitbucket.org:elosystemsteam/paypoint-potter.git HEAD:B2-Bisque" returned status code 1: stdout: stderr: To git@bitbucket.org:elosystemsteam/paypoint-potter.git ! [rejected] HEAD -&gt; B2-Bisque (non-fast-forward) error: failed to push some refs to 'git@bitbucket.org:elosystemsteam/paypoint-potter.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and merge the remote changes hint: (e.g. 'git pull') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  6. 0

    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.

    Jenkins JIRA | 3 years ago | Udo Waechter
    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

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.push
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:790)
      3 frames
    3. Hudson GIT plugin
      GitPublisher$3.invoke
      1. hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:303)
      2. hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:265)
      2 frames
    4. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:865)
      2. hudson.FilePath.act(FilePath.java:838)
      2 frames
    5. Hudson GIT plugin
      GitPublisher.perform
      1. hudson.plugins.git.GitPublisher.perform(GitPublisher.java:265)
      1 frame
    6. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
      6. hudson.model.Run.execute(Run.java:1593)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:237)
      9 frames