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 and Git Link Repository Authentication Failed


I am linking the git project repository in bamboo. Both of these applications are in same server. Now when I am going to add git repository it shows the below mentioned error.

Could not test connection. Please add your repository host SSH key to the list of trusted keys."


I have created ssh keys with my Git login credential say there name are XYZ and I have added the in git as well as in bamboo in " Trusted Keys" option under Security. and then going to authenticate by using ssh private key i.e, XYZ. After that every time I clicked on the Test Connection it shows above mention error.

I am using Git 2.6.0 V

Bamboo 5.10.2 V

Any one can help me or suggest me any possible way to solve the issue? 

Thanks in advance.

2 answers

1 vote

You need to add Git repo server host SSH key to the list of Trusted keys. See details in documentation



Thanks for the answer. I have already gone through the link and added the same ssh public key in the Trusted Key section what I also added in git repository. still I am getting this issue.

No, it's different key. Execute command

ssh-keyscan localhost

It will print all SSH keys of server. You can add them to Trusted keys list

Another approach is to add repository without testing connection and start build. It will fail with error message. There will be Add key button at error box which allows you to add correct repository SSH key

I have the same setup and the same problem...On my system the "ssh-keyscan localhost" returns no results.

Also, I'm not seeing how to add the repository "Without testing".

Don't click "Test connection" button. Repo will be added to plan.

So I've added my host SSH key to the list of trusted keys – I've tried just adding the thumbprint and I've also tried adding the key returned from:
`ssh-keyscan -p 7999 localhost`

Do I need to somehow add port number information to this public key? I'm not seeing any documentation on how to specify a port number in the trusted keys list or what format it's expecting for the public key.

No, you don't need to add port.  Can you try path with adding host key from error box?

To do it you need to add repository to your plan without clicking "Test connection" button. Then start plan. It will fail with message that host is not trusted. Error message will show Add key link which will add server host key to the list of Trusted keys

All I have is a "Save Repository" button. Then the error message just shows a generic message. See attached screenshot (sensitive fields obfuscated): I must be missing something.




You need to add the git machine into trusted hosts:


Basically you need to just add it like above. 

Instead of RSA it is showing ECDSA.

The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 45:f2:fa:8b:ca:a0:df:0e:fe:ae:56:1b:66:c7:f8:4f.
Are you sure you want to continue connecting (yes/no)?

What to do?


Answer yes. I think your current ssh is set to use ECDSA keys in this case so you should be fine with that. Test and see if it works. 


I have answered yes. But it throws same error as I said above. Any idea?

have you tried git cloning with that user that you have in bamboo? if you try that can you git clone the repository from the Bitbucket ? 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

449 views 2 6
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you