Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17421

Could not create Bitbucket Server repository in Bamboo server if Bitbucket Server SSH Access Key is disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.10.3, 5.11.4.1, 7.1.2
    • None

    Description

      Summary

      Creating or saving a Bitbucket Server repository in Bamboo server will have the following error in the UI:

      Could not check if existing access key is valid: null
      

      Steps to Reproduce

      1. Disable the option "SSH access keys enabled" at Bitbucket Server Administration >> Settings >> Server Settings
      2. Login to Bamboo server with a user that have Admin permission to the Bitbucket Server repository
      3. Create a Bitbucket Server repository in Bamboo server Linked repositories

      Expected Results

      The repository will be created successfully by adding the SSH key into User account

      Actual Results

      The below exception is thrown in UI:

      Could not check if existing access key is valid: null
      

      Notes

      No error in Bamboo or Bitbucket Server logs
      Enabling debug logging in Bitbucket Server will have the following stack trace:

      2016-04-07 13:14:33,669 DEBUG [http-nio-7990-exec-30] admin @1P5W2PDx794x67346x0 172.20.20.37 "POST /rest/keys/1.0/projects/PROJECTNAME/repos/REPONAME/ssh HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 409
      com.atlassian.bitbucket.ssh.SshKeyAccessDisabledException: Support for SSH access keys has been disabled. Please contact an administrator
      	at com.atlassian.bitbucket.internal.key.ssh.DefaultSshAccessKeyService.set(DefaultSshAccessKeyService.java:311) ~[bitbucket-ssh-4.5.1.jar:na]
      	at com.atlassian.bitbucket.internal.key.ssh.rest.SshAccessKeyResource.addForRepository(SshAccessKeyResource.java:191) ~[bitbucket-ssh-4.5.1.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.5_1459814966000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.5_1459814966000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.5_1459814966000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.5_1459814966000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.5_1459814966000.jar:na]
      	at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:89) [atlassian-connect-plugin-1.1.70-bitbucket-01.jar:na]
      

      Workaround

      1. Create a new user in Bitbucket Server that does not have Admin permission to Bitbucket Server Project or Repository
      2. Create the same user in Bamboo Server (this user will have Admin permission in Bamboo)
      3. Use the new user to create Bitbucket Server repository so that the SSH key is added into Bitbucket Server User Account instead of Bitbucket Server Repository Access Key

      Attachments

        Activity

          People

            Unassigned Unassigned
            klfoong Foong (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: