Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo and Git Link Repository Authentication Failed

Deleted user March 21, 2016

Hi,

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 XYZ.pub. I have added the XYZ.pub 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
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 22, 2016

You need to add Git repo server host SSH key to the list of Trusted keys. See details in documentation https://confluence.atlassian.com/bamboo/managing-trusted-keys-800714520.html

Deleted user March 22, 2016

Hi,

 

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.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 22, 2016

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

tunurgitr March 23, 2016

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".

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2016

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

tunurgitr March 24, 2016

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.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 24, 2016

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

tunurgitr March 24, 2016

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.

ss_1.png

Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2017
0 votes
Kalle Sirkesalo March 21, 2016

Hello,

 

You need to add the git machine into trusted hosts:

https://www.debian-administration.org/article/503/How_do_you_manage_your_SSH_host_keys

 

Basically you need to just add it like above. 

Deleted user March 21, 2016

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?

 

Kalle Sirkesalo March 21, 2016

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. 

Deleted user March 21, 2016

Thanks,

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

Kalle Sirkesalo March 21, 2016

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
TAGS
AUG Leaders

Atlassian Community Events