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

Bamboo Linked repositories Bitbucket Server

Marcelo Neto June 5, 2019

Hi everyone

 

Im getting this error, and i lost to much time and i dont find any solutions, someone can help me?

 

I get this error after add linked repositories

 

Screenshot_1.png

 

if help i used bitbucket server version v5.16.0 and bamboo server version 6.7.2

 

Please someone help, its urgent.

Thanks

Marcelo

 

1 answer

1 accepted

1 vote
Answer accepted
Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2019

Hi @Marcelo Neto,

Is this the first linked repository that you are setting up? Or do you have additional linked repositories that are working correctly?  I'm asking this because I'm trying to identify the source of your issue.  Looking at the error message you received, if you have other linked repositories that are working, I would recommend looking to see if this repository has changed projects recently.

If none of your linked repositories are working, then you might want to look at the SSH key (if you are using that) or the application link between your Bamboo & BitBucket Servers as something may have happened that is preventing communication between the two servers.

You could also look at the atlassian-bamboo.log file in the logs folder of your <BAMBOO_HOME> directory to see if you have any errors reported there which might help provide more insight.

I hope that helps you get to the root of your issue.

-James 

Marcelo Neto June 6, 2019

Hi @Jimmy Seddon

Yes this is my first linked repository, apparently its everything ok, because bamboo recognized all my repositories on Bitbucket server, but after saved repositories on bamboo its showing the message i showed on up.

 

Its very strange, i will check the logs, and i give you some feedback.

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2019

Ok if it can recognize the repositories, we can rule out an issue with the application links.  The fact that this is the first one also means it might not be specific to this repository.

Are you using a service account to run your Bamboo server?  And are you using SSH keys to connect to the repository? 

I'm just trying to think of other things that could cause this error to happen.

-James

Marcelo Neto June 6, 2019

Yes, i using a specified account with admin permission for run bamboo service. i set to a same ssh key for repositories, but i get the same error

Marcelo Neto June 6, 2019

I found this error on logs after saved repositories, can you help?

2019-06-06 14:11:30,581 ERROR [11-BranchDetectionBackgroundThread:pool-19-thread-2] [BranchDetectionServiceImpl] Repository error while detecting branches for plan PC-PC. java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.get(AlwaysInvalidatingCacheDecorator.java:65)
at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:126)
at com.atlassian.bamboo.util.CallableResultCache.call(CallableResultCache.java:141)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:613)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getOpenBranches(NativeGitOperationHelper.java:588)
at com.atlassian.bamboo.plugins.git.v2.GitBranchDetector.getOpenBranches(GitBranchDetector.java:46)
at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerBranchDetector.getOpenBranches(BitbucketServerBranchDetector.java:29)
at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$2.getOpenBranchesCaller(RepositoryCachingFacadeImpl.java:72)
at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$2.load(RepositoryCachingFacadeImpl.java:61)
at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$2.load(RepositoryCachingFacadeImpl.java:57)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl.getOpenBranches(RepositoryCachingFacadeImpl.java:126)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.lambda$getOpenBranches$4(BranchDetectionServiceImpl.java:541)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.getOpenBranches(BranchDetectionServiceImpl.java:540)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.findBranchesCreatedBeforePlanCreation(BranchDetectionServiceImpl.java:404)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.access$500(BranchDetectionServiceImpl.java:83)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.lambda$run$0(BranchDetectionServiceImpl.java:132)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:383)
at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:335)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.run(BranchDetectionServiceImpl.java:125)
at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:106)
at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:99)
at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:53)
at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector.run(BranchDetectionServiceImpl.java:178)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Cannot read keypair, it doesn't contain any line with '-----BEGIN'
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromReader(ProxyConnectionDataBuilderImpl.java:85)
at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromString(ProxyConnectionDataBuilderImpl.java:65)
at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromString(ProxyConnectionDataBuilderImpl.java:27)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.beforeRepositoryAccess(NativeGitOperationHelper.java:231)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.lambda$getRemoteRefs$1(NativeGitOperationHelper.java:602)
at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:38)
at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:34)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
... 39 more

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2019

Hi @Marcelo Neto,

You might want to check out the last answer in this post:

https://community.atlassian.com/t5/Bamboo-questions/Git-checkout-in-Bamboo-fails-with-Cannot-read-keypair-it-doesn-t/qaq-p/651201

You might also want to read though this post here:

https://community.atlassian.com/t5/Bamboo-questions/Git-checkout-in-Bamboo-fails-with-Cannot-read-keypair-it-doesn-t/qaq-p/651201

Looks like one or both of those might help you resolve your issue.

-James

Like Marcelo Neto likes this
Marcelo Neto June 6, 2019

@Jimmy Seddon 

 

I appreciate your help after check the file logs and search for the error i founded a solution.

On logs bamboo said "Host key no trusted by bamboo"

After exec this command on git bash ssh-keyscan -p 7999 localhost and copy  ssh rsa key for the trusted keys on bamboo.. THE PROBLEM WAS SOLVED!! :D

Finally :)

Thanks for help, the solution can be founded on this post: https://community.atlassian.com/t5/Bamboo-questions/Bamboo-and-Git-Link-Repository-Authentication-Failed/qaq-p/196013

 

-Marcelo

Like Jimmy Seddon likes this
Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2019

I'm glad you were able to get it solved!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events