SSH keys option showing blank page or empty screen in Bitbucket Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

While trying to access the SSH keys option of the user profile in Bitbucket Data Center, it is showing a blank page or empty screen though the key is present for the user.

 

Environment

Tested on Bitbucket Data Center 8.9.6
Applied to Bitbucket Data Center 8.x

Diagnosis

A. Check if the key is present in Bitbucket UI under the user account.
B. If yes, compare the SSH key present on the user profile or user's machine with the key present in the database (relevant tables are present below).

Cause

This issue generally occurs when the SSH key for the user is corrupted somehow in the Bitbucket Database. Generally, SSH keys for users get stored in the database, and if for any reason the key gets affected, an empty page on the Bitbucket UI can be seen.

Solution

The below steps should be followed to resolve this issue:

1. Connect to the Bitbucket database and collect the output of the following query:

a. select * from public."sta_normal_user";   --- Collect the user_id from this query.

b. select * from public."AO_FB71B4_SSH_PUBLIC_KEY" where user_id=<user_id>;   --- Pass the user_id from the first table output. Once done, collect the ID from the ENTITY_ID column.

Note: Please change the query format based on your database requirements. The above queries are specific to the PostgreSQL database.

2. Now run the below REST API command based on the keyId which will be passed from the above steps (1b. -> ENTITY_ID). This API will delete the SSH key for the user from the database.

curl -u <admin_username>:<admin_password> --request DELETE --url '<Base_URL>/rest/ssh/latest/keys/{keyId}'

3. Once done, the user should get a prompt to add the SSH key. Now add the SSH key for the user in Bitbucket UI.

Last modified on Mar 31, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.