Git checkout when running build plan fails even though "test connection" succeeds Edited

When I run the build plan, doing git checkout fails with:

com.atlassian.bamboo.repository.RepositoryException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'

However, when I set up the repo and do "Test connection", the connection is good.

The id_rsa file which I provided begins with:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info:

I'm lost, please help me.

repo config.png 

1 answer

0 votes
Gonchik Tsymzhitov Community Champion Oct 06, 2017

Hi! 

If I understand correct, you have tried to configure plan. 

 But this way by default will work

if you follow this links

https://confluence.atlassian.com/bamboo/checking-out-code-289277060.html

https://confluence.atlassian.com/bamboo/git-289277007.html

 

BTW, you check your linked repositories here

{{BAMBOO_BASEURL}}/admin/configureLinkedRepositories!doDefault.action

 

I hope this is help for you. 

 

Cheers, 

Gonchik Tsymzhitov

Hi, thanks for the links. I checked those and it seems to me that I have done everything by the book. More screenshots below.

checked repo.pngtask.png

Gonchik Tsymzhitov Community Champion Oct 06, 2017

And your problem again reproduced? 

What about key on git side? Is it accepted? 

And your problem again reproduced? 

That was my original configuration and it again reproduced. 

What about key on git side? Is it accepted? 

I'm not sure that I understand the question.

What seems to be happening is that my id_rsa is rejected. For example, the atlassian-bamboo.log reads:

2017-10-06 10:35:31,590 INFO [17-BAM::Default Agent::Agent:pool-32-thread-1] [BuildAgentControllerImpl] Agent 196609 checking build queue for executables...

2017-10-06 10:37:38,462 INFO [10-BAM::PlanExec:pool-17-thread-2] [DefaultErrorHandler] Recording an error: Unable to detect changes : VSR-E2E0 : com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'

2017-10-06 10:37:51,526 INFO [10-BAM::PlanExec:pool-17-thread-4] [DefaultErrorHandler] Recording an error: Unable to detect changes : VSR-E2E : java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'

The custom SSH key is a proper private key and its respective public key is listed under /home/ubuntu/.ssh/authorized_keys

Gonchik Tsymzhitov Community Champion Oct 06, 2017

Well, 

1. What is your version Bamboo? 

2. Do any other plans work under this instance? What about agents? 

3. 

The custom SSH key is a proper private key and its respective public key is listed under /home/ubuntu/.ssh/authorized_keys

It is good, but your agents knows about that? 

Could you check it from agent directly? 

 

Thanks

 

Best regards,

Gonchik Tsymzhitov

1. What is your version Bamboo? 

2. Do any other plans work under this instance? What about agents? 

Version 6.2.1, a new instance of Bamboo, trying to get the first plan off the ground.

3. 

The custom SSH key is a proper private key and its respective public key is listed under /home/ubuntu/.ssh/authorized_keys

It is good, but your agents knows about that? 

Could you check it from agent directly? 

I am using the default agent, haven't applied any specific configurations for it. 

Could you restart Bamboo? 

In fact, it should work. 

 

As I understand, you are already check this steps

https://confluence.atlassian.com/bamkb/how-to-perform-a-git-ssh-checkout-from-a-script-task-741999875.html

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

466 views 2 5
View question

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