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

Accepted Answer
0 votes

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
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

496 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