Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

goran October 21, 2022

Hi,

I wanted to add my public ssh key to the repository and I am getting this error.

Could You please help me.

Kind regards.

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 25, 2022

Hi @goran,

An SSH key can be added as an Access key to a repository from the Repository settings > Access keys on Bitbucket website. You need to have admin permissions on a repo in order to be able to see the Repository settings option.

A certain SSH key can be added as an Access key to multiple repositories, however, it cannot be added as an SSH key to an account or workspace at the same time.

If you get this error when you try to add the key to a repository's Access keys, then this message would show only if you try to add an Access key that already exists for that same repo. There shouldn't be any issues adding it to another repo where this specific key is not added. If you get this error while adding the key to a repo's Access keys, please check if this specific key already exists in the repo.

If you are trying to add a key (that is already an Access key) to your account's SSH keys instead, via https://bitbucket.org/account/settings/ssh-keys/, or to a workspace's SSH keys, this is something we do not allow. You will need to either generate a new SSH key pair, or remove the Access key from the repo in order to add it to your account/workspace.

If you're still having issues, please share some more details on what you are trying to do so we can further assist you.

Kind regards,
Theodora

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2022

There's no easy way to work this out because the keys that belong to other accounts should not be shared.

If you shared the key with someone, you should know who.  If you were given the key by someone, then you'll need to ask them.  

If you have no luck chasing it down, you can raise a support request with Atlassian, and they can search out the key for you and hence identify the account you shared it with.

If you don't want to spend ages chasing down the share, then you can (and should) create a new key for your account and use that instead.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events