Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Someone has already added that key as an access key to a repository.

James Trigg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2022

Hi I am getting this error "Someone has already added that key as an access key to a repository." when I try to add my ssh keys to my account

 

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2022

Hi @James Trigg

Welcome to the community.

The error message you're getting when you add your public SSH key under your account level SSH key settings indicates that it is already added as an Access key to a repository.

To know exactly the specific repository where it is added, you can use the below Bitbucket Cloud API 2.0 endpoint using the cURL command.

curl -u your_bb_username:app_password "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/deploy-keys?fields=values.label,values.key"

Reference: API 2.0 List deploy keys
Please kindly note that you'll need your Bitbucket Cloud username and an App password for the API authentication

To get the list of your repositories, you can use this API 2.0 endpoint. - https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get

Hope it helps and let me know how it goes.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events