Bamboo fails to check out or push to Stash - The remote end hung up unexpectedly

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Bamboo build fails to check out, or it fails to push the updates to the remote Stash repository. There is a generic error saying "The remote end hung up unexpectedly":

(Auto-migrated image: description temporarily unavailable)

Cause

There can be 2 main causes: a wrong Stash repository URL, or wrong SSH keys.

Resolution

It is always a good idea to start the troubleshooting process from command line to see if the communication between Bamboo and Stash works fine. For example, the first step can be trying to clone or push changes to the Stash repository from command line (without using Bamboo) from the same working directory (BAMBOO_HOME/xml-data/build-dir/PROJ1-PLAN1-JOB1) using the same user account that runs Bamboo service. If the first step doesn't work, check the SSH keys and the Stash URL that the Bamboo plan is using to check out or push the changes. Make sure that you are using the correct branches in your configurations.

  1. Wrong SSH public/private keys are getting used in the Bamboo plan configuration and in Stash user profile. The default SSH keys can be used:

    Private key - in the plan repository configuration: ~/.ssh/id_rsa

    (Auto-migrated image: description temporarily unavailable)

    Public key - in the Stash profile SSH configuration: ~/ssh/id_rsa.pub

    (Auto-migrated image: description temporarily unavailable)
  2. A wrong Stash repository URL is getting used. The URL mentioned in the Stash repository should be used:

    (Auto-migrated image: description temporarily unavailable)
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.