Connecting Bamboo to a stash git repo

I am trying to connect point bamboo to a stash repo for some time now and I run the plan (which only does a source code checkout from default repo and that's it. The plan says successful and always errors with the following:

Server Configuration - Puppet Integration SC-PI-40 : Errors getting changes for SC-PI-40

(com.atlassian.bamboo.repository.RepositoryException : java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote ssh://f6f0d878-a9a4-4f3e-b5de-fe18d74849cc@ failed with code 128. Working directory was [.]., stderr: [Warning: Permanently added '[]:32922' (RSA) to the list of known hosts., fatal: remote error: Repository does not exist, The requested repository does not exist, or you do not have permission to, access it., fatal: The remote end hung up unexpectedly])
(06 Jun 2014, 9:02:35 PM)
Both stash and bamboo list each other under the application links.
Bamboo version 5.4.2
Stash v3.0.1

4 answers

1 accepted

0 votes
Accepted answer

Reinstalled the latest bamboo and made sure the SSH keys were correct and that seemed to work. Still not 100% sure which ID bamboo uses to access stash's repos but it is working so I won't touch that which isn't broken.

I would delete and add app links.

And as the same user you can clone the same repository to the bamboo server? It looks like the bamboo server/connecting user doesn't have stash's ssh key stored in known_hosts. Manually running the ssh clone will ensure the various connectivity issues are not the problem.

Another possibility is that the repo is empty but less likely since you're trying to build something. I have seen a similar error when changing the repository used in a build or the clone method (http to ssh). Shutdown, clear the bamboo cache, restart, then run a new build (don't re-run a previously failed build).

The same user? I can log in to the Bamboo server as the same user as I log into bamboo with and do this:

robertn@dev2:~/.ssh$ /usr/bin/git ls-remote ssh://

Enter passphrase for key '/home/robertn/.ssh/id_rsa':



No it is not empty.

Oh so you have to enter your passphrase? That's possibly the issue. Add your ssh key to key-agent (or whatever ssh key management tool your OS uses) so that you aren't prompted for a passphrase when you run ssh commands.

Also I went in and changed it to where there is no pascode and got a success command line git and a failed bamboo get-remote with the exact same error.

Hi Robert,

Could it be that the stash base url is localhost ( ?
or that some hosts file is incorrect?

Why is it trying to add to the list of know hosts?

Just wondering if it might indicate the problem.

Best regards,


That a Bamboo quirk. On the command line

git ls-remote ssh://

I use the fqdn name. Bamboo is implementing an internal SSH proxy for git in order to authenticate properly with remote repository. Which does not appear to work well. Please see this post for why it is going to some unreproducible host connection:

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

189 views 4 1
Join discussion

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