It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo Upgrade SSH issue

I cannot start the old stash 3.1 and bamboo 5.6 on a server due to some security reasons. So I am upgrading them to the latest version on another server. 

BitBucket starts fine without any issues.

But when I start the new bamboo, I got below error in the log file, and these errors wont end, it is like an infinite loop. 

2017-09-13 03:31:08,086 INFO [10-BAM::PlanExec:pool-17-thread-1] [DefaultErrorHandler] Recording an error: Unable to detect changes : TBL-VM : com.atl
assian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote ssh://f6d781cf-2e5f-4c20-bfba-735f0e700643@ failed with code 128. Working directory was [/opt/bamboo/atlassian-bamboo-6.1.0/temp].,

stderr: Authenticating remote session failed
stdout: Warning: Permanently added '[]:43470' (RSA) to the list of known hosts.

BAMBOO-SSH-PROXY: [SSH proxy tried to connect to []: and failed due to the following error: [Authenticating remo
te session failed]: No more authentication methods available]
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I checked the new BiBucket, Access Keys are not set in all the projects.

But from the ssh error in the log I think it is using a shared credential in Bamboo? Does this error mean that the private key in Bamboo doesnt match with the public key(it is empty in the upgraded bitbucket) in BitBucket? How do I retrieve the private key from the old bamoo file system?



1 answer

1 accepted

1 vote
Answer accepted

Generally, when you've changed your environment, such as upgrading, migrating physical servers or even URLs, it's best to recreate the application link on both sides (as recommended in  Application Links Troubleshooting Guide) . Try that first as many things are changed in the latest versions of Bamboo and Bitbucket.

If you still cannot get it working, run the same ssh command from a command prompt outside Bamboo and confirm if you are able to successfully authenticate via ssh as the same user and produce result.

Let me explain briefly how we authenticate when Bamboo works with Bitbucket repositories.

  1. When configuring repository definition on Bamboo side (either in Plan or in Administration/Linked repositories) Bamboo will create SSH keypair and will store private key in the repository configuration and upload public key to Stash (it can be seen in the list of SSH keys of a user X who defined repository on Bamboo side).
  2. When running a build Bamboo will present the private key thus making Stash recognise it as user X (no matter how plan was run).

Please, make sure the user saving repository configuration in Bamboo has permissions to the repository in Bitbucket.

it worked after update the application link in bamboo and bitbucket.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published yesterday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

70 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you