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

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

Priidu Kull October 6, 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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 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 October 6, 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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2017

And your problem again reproduced? 

What about key on git side? Is it accepted? 

Priidu Kull October 6, 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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 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 October 6, 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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2017

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

Atlassian Community Events