Bitbucket: Cant add SSH key

MarinAngelo May 30, 2018

When I add SSH key I receive the following msg:

Someone has already added that SSH key to another account

What should that other account be? I'm not aware to have other Bitbucket accounts

4 answers

1 vote
Patrick Brown October 20, 2020

This is terrifying and goes against the spirit of public keys.

 

This makes me nervous to keep using anything Atlassian. Yikes.

1 vote
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2018

Hi Marinus, welcome to the Atlassian Community :)

I can see that your Bitbucket account already has some SSH keys added, so maybe you're trying to add the same one again, which Bitbucket won't allow. In that case you'll need to create a new SSH key following the steps at Set up an SSH key.

Let us know if you have any questions and we'll be happy to help!

Kind regards,

Ana

Niels de Feyter November 19, 2019

Why force a user to create a new ssh-key? Good to show a warning, but why can it be dismissed

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2019

Hi @Niels de Feyter,

The same SSH key can not be used in multiple Bitbucket accounts, so when you try to re-use it you'll get that message to let you know that specific SSH key is already in use. It's not that we want to force users to create more SSH keys, it's just the way it works. 

Hope this clarifies your concern.

Best regards,

Ana

Like jiimka likes this
Niels de Feyter November 20, 2019

I know, but I have to because it's forced to use multiple bitbucket-accounts.

My case is that different clients gave me access to bitbucket-repo's via different email-addresses. I did not find out how I can add multiple e-mail addresses to one single account. That would be my preferred solution; just one account because it's just me having access to multiple repositories.

But now I have multiple bitbucket-accounts with multiple usernames and try to work with that.

So I went down the rabbit-hole and I searched and searched for solutions. But right now to best solution I have found is to override the key on my .ssh/config every time I switch accounts. To me that is just not user-friendly at all.

So would it be possible to allow reusing an SSH-key?

Niels de Feyter November 20, 2019

Haha now I noticed my previous comment I was logged-in with a different account. ndf is me though

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 20, 2019

Hi Niels!

My suggestion would be that you choose one of those accounts to be your unique account, and you transfer the repositories from the other accounts to that one. After that, you can add multiple email addresses to your Bitbucket account but note that this will only be useful to let people find your commits using an email which is not your main address. If other users would like to share repos with you, they'll still need to use your primary email address. 

Hope that helps!

Ana

Niels de Feyter November 21, 2019

Hi Ana, thanks for the follow-up! I will try your suggestion.

Niels de Feyter November 21, 2019

Doesn't work. I can't e-mail addresses to my main-account because of 'is already in use by another user.' (which it surely is because of the multiple accounts).

Time to give up for me.

But still thanks for the help (no sarcasm)!

Raju Gautam November 30, 2020

Hi @Ana Retamal 

I can add new generated key but when you try to clone the repository, it throws the following error:

Cloning into 'my-repo-name'...
Forbidden
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

Is there another solution ?

Renée Maksoud Correia Rodrigues November 30, 2021

@Ana Retamal gave up too

0 votes
dshumaker October 17, 2020

I am also receiving this error message however when I go to  https://bitbucket.org/account/settings/ssh-keys/  There are NO keys listed.  Is there a way to reset the account somehow?  (ie. Tell bitbucket atlassian that I do NOT have any keys ) 

dshumaker October 21, 2020

For me the solution was that the ssh key was installed per project and not per account.  Once I went to the project specific keys then the key was indeed listed - and I was able to renew, delete, add the appropriate keys.

0 votes
Danyal Iqbal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2018

You need a new SSH key.

Paul Redman February 4, 2020

This is a really poor dreadful answer. Is there any good reason at all why this is the case?

Paul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events