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

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

Priidu Kull Oct 06, 2017

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 Leader 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

Priidu Kull Oct 06, 2017

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 Leader Oct 06, 2017

And your problem again reproduced? 

What about key on git side? Is it accepted? 

Priidu Kull Oct 06, 2017

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 Leader 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

Priidu Kull Oct 06, 2017

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. 

Gonchik Tsymzhitov Community Leader Oct 06, 2017 • edited

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Handling Opsgenie Alerts

Hi everyone, welcome to the kb articles for Opsgenie FAQs. I'm one of the Technical Support Engineers for Opsgenie who will be providing weekly posts on FAQs from customers.   All alerts are ...

63 views 0 3
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