• 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      In Bamboo, it's possible to specify an SSH private key to authenticate with certain repository types (e.g. Bitbucket Cloud).

      Currently, it appears that, while RSA keys work fine (even larger 4096 bit ones), the new(ish) Ed25519 SSH keys do not. The error I receive when trying is:

      [RepositoryResource] Failed to connect to repository (type: Bitbucket Cloud, location: https://bitbucket.org/xxxxx/yyyyyyy, time: 13.23 ms, errors: [Cannot decode connection params])
      
      ERROR [11-BranchDetectionBackgroundThread:pool-19-thread-2] [BranchDetectionServiceImpl] Repository error while detecting branches for plan PROJ-PLAN. Cannot decode connection params
      com.atlassian.bamboo.repository.RepositoryException: Cannot decode connection params
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.beforeRepositoryAccess(NativeGitOperationHelper.java:249)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.lambda$getRemoteRefs$1(NativeGitOperationHelper.java:602)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$$Lambda$563/619325710.call(Unknown Source)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:39)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:35)
      ...
      	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:142)
      	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.bitbucket.v2.BitbucketCloudBranchDetector.getOpenBranches(BitbucketCloudBranchDetector.java:31)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.getOpenBranchesCaller(RepositoryCachingFacadeImpl.java:65)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.call(RepositoryCachingFacadeImpl.java:54)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.call(RepositoryCachingFacadeImpl.java:49)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:39)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:35)
      ...
      	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:142)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl.getOpenBranches(RepositoryCachingFacadeImpl.java:72)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.lambda$getOpenBranches$6(BranchDetectionServiceImpl.java:589)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$$Lambda$526/338388242.call(Unknown Source)
      	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.getOpenBranches(BranchDetectionServiceImpl.java:588)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.findBranchesCreatedBeforePlanCreation(BranchDetectionServiceImpl.java:431)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.access$500(BranchDetectionServiceImpl.java:91)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.lambda$run$1(BranchDetectionServiceImpl.java:141)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1$$Lambda$494/515717325.doInHibernate(Unknown Source)
      	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:134)
      	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:187)
      	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(Thread.java:745)
      Caused by: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
      	at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
      	at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromReader(ProxyConnectionDataBuilderImpl.java:84)
      	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)
      	... 54 more
      

      bitbucket.org has had support for Ed25519 keys since 2016 and they are increasingly in wider use generally. It would be good to see Bamboo add support for this key type too.

       

      Related to:

            [BAM-19764] Support Ed25519 SSH keys for SSH transport

            Would like to see this

            Ricardo Watkins added a comment - Would like to see this

            Bamboo should support this given that many vendors are recommending that Ed25519 be used since it considered to be strongest mathematically. In addition it's in the default instructions when integrating with Github.

            https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

            Jean Desulme added a comment - Bamboo should support this given that many vendors are recommending that  Ed25519  be used since it considered to be strongest mathematically. In addition it's in the default instructions when integrating with Github. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

            Will this hopefully get added before February 2021?
            All new Linux OS-es use by default ed25519 format.

            Georgi Yankov added a comment - Will this hopefully get added before February 2021? All new Linux OS-es use by default ed25519 format.

            Will this ever get fixed? Almost 2021 and still no ed25519 in Bamboo, this is becoming a problem for a product that is supposed to be able to connect to other servers.

            Daniel NOIZET added a comment - Will this ever get fixed? Almost 2021 and still no ed25519 in Bamboo, this is becoming a problem for a product that is supposed to be able to connect to other servers.

            Still an issue in 7.0.4.

            Jysk Fynske Medier added a comment - Still an issue in 7.0.4.

            Haskonashi added a comment -

            Yes behaviour still in 6.9.2

            Haskonashi added a comment - Yes behaviour still in 6.9.2

            Alexey, I was going off the license file that I found in the files. Still having same issue in 6.9.2 as the reporter did in 6.4. Not sure if it's Bamboo or sshj that's causing the problem though. Had to move to ECDSA (under 521 bits) with the older PEM format.

            Mark Garrett added a comment - Alexey, I was going off the license file that I found in the files. Still having same issue in 6.9.2 as the reporter did in 6.4. Not sure if it's Bamboo or sshj that's causing the problem though. Had to move to ECDSA (under 521 bits) with the older PEM format.

            Alexey Chystoprudov added a comment - - edited

            mark.garrett298749959, Bamboo 6.9.0 uses SSHJ 0.27.0 for SSH\SCP tasks. It was updated as part of BAM-20246 fix

            Alexey Chystoprudov added a comment - - edited mark.garrett298749959 , Bamboo 6.9.0 uses SSHJ 0.27.0 for SSH\SCP tasks. It was updated as part of BAM-20246 fix

            It appears that release v0.27.0 from back in January may actually fix this. The dev put in a fix to allow the new

            -----BEGIN OPENSSH PRIVATE KEY-----
            

            header format that is the only one Ed25519 can use. 6.9.2 currently uses the older 0.26 release.

            Mark Garrett added a comment - It appears that release  v0.27.0  from back in January may actually fix this. The dev put in a fix to allow the new -----BEGIN OPENSSH PRIVATE KEY----- header format that is the only one Ed25519 can use. 6.9.2 currently uses the older 0.26 release.

            This is also an issue when using Deployment Projects and ssh credentials.

            Error occurred while running Task 'Copy artifacts to Staging(2)' of type com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask.16-May-2019 11:59:14
            java.lang.RuntimeException: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY 16-May-2019 11:59:14
                    at com.atlassian.bamboo.plugins.scp.SSHKeyProvider.<init>(SSHKeyProvider.java:35)16-May-2019 11:59:14
                    at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:258)16-May-2019 11:59:14
                    at com.atlassian.bamboo.plugins.scp.ScpTask.run(ScpTask.java:121)16-May-2019 11:59:14
                    at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:107)16-May-2019 11:59:14
                    at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$1(TaskExecutorImpl.java:315)16-May-2019 11:59:14
                    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)16-May-2019 11:59:14
                    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:315)16-May-2019 11:59:14
                    at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)16-May-2019 11:59:14
                    at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)16-May-2019 11:59:14
                    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)16-May-2019 11:59:14
                    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)16-May-2019 11:59:14
                    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)16-May-2019 11:59:14
                    at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)16-May-2019 11:59:14
                    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)16-May-2019 11:59:14
                    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)16-May-2019 11:59:14
                    at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)16-May-2019 11:59:14
                    at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)16-May-2019 11:59:14
                    at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)16-May-2019 11:59:14
                    at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)16-May-2019 11:59:14
                    at java.lang.Thread.run(Thread.java:748)16-May-2019 11:59:14Caused by: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY16-May-2019 11:59:14
                    at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)16-May-2019 11:59:14
                    at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.readKeyPair(PKCS8KeyFile.java:63)16-May-2019 11:59:14
                    at net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider.getPublic(BaseFileKeyProvider.java:81)16-May-2019 11:59:14
                    at com.atlassian.bamboo.plugins.scp.SSHKeyProvider.<init>(SSHKeyProvider.java:30)16-May-2019 11:59:14
                    ... 19 more
            

            Mark Garrett added a comment - This is also an issue when using Deployment Projects and ssh credentials. Error occurred while running Task 'Copy artifacts to Staging(2)' of type com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask.16-May-2019 11:59:14 java.lang.RuntimeException: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY 16-May-2019 11:59:14         at com.atlassian.bamboo.plugins.scp.SSHKeyProvider.<init>(SSHKeyProvider.java:35)16-May-2019 11:59:14         at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:258)16-May-2019 11:59:14         at com.atlassian.bamboo.plugins.scp.ScpTask.run(ScpTask.java:121)16-May-2019 11:59:14         at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:107)16-May-2019 11:59:14         at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$1(TaskExecutorImpl.java:315)16-May-2019 11:59:14         at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)16-May-2019 11:59:14         at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:315)16-May-2019 11:59:14         at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)16-May-2019 11:59:14         at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)16-May-2019 11:59:14         at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)16-May-2019 11:59:14         at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)16-May-2019 11:59:14         at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)16-May-2019 11:59:14         at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)16-May-2019 11:59:14         at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)16-May-2019 11:59:14         at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)16-May-2019 11:59:14         at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)16-May-2019 11:59:14         at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)16-May-2019 11:59:14         at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)16-May-2019 11:59:14         at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)16-May-2019 11:59:14         at java.lang. Thread .run( Thread .java:748)16-May-2019 11:59:14Caused by: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY16-May-2019 11:59:14         at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)16-May-2019 11:59:14         at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.readKeyPair(PKCS8KeyFile.java:63)16-May-2019 11:59:14         at net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider.getPublic(BaseFileKeyProvider.java:81)16-May-2019 11:59:14         at com.atlassian.bamboo.plugins.scp.SSHKeyProvider.<init>(SSHKeyProvider.java:30)16-May-2019 11:59:14         ... 19 more

              mgardias Marcin Gardias
              mknight@atlassian.com Michael Knight
              Votes:
              8 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: