Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.10.3, 5.11.4.1, 7.1.2
-
None
-
12
-
Severity 3 - Minor
-
0
-
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
- Disable the option "SSH access keys enabled" at Bitbucket Server Administration >> Settings >> Server Settings
- Login to Bamboo server with a user that have Admin permission to the Bitbucket Server repository
- 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
- Create a new user in Bitbucket Server that does not have Admin permission to Bitbucket Server Project or Repository
- Create the same user in Bamboo Server (this user will have Admin permission in Bamboo)
- 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