Incorrect "Someone has already registered this as a deploy key" message.

Issue #7323 invalid
russell_hidef created an issue

I had an SSH key I added mistakenly as a deployment key (I didn't realize that that would be read-only). So I fixed that by removing it from the list of deployment keys, but now when I try to add that key to my account, I get the error "Someone has already registered this as a deploy key."

How can I clear this out so it will let me add the key?

Official response

Comments (38)

  1. russell_hidef reporter

    I think I know what happened. That same key was being used as a deploy key by someone else on another project. My mistake.

    I just generated a new key to use instead. I don't think this is a bug.

  2. Michael Frauenholtz staff


    Once you remove your SSH key as a deployment key, it should be available to use as a global SSH key. Can you make sure you don't have that key set up on any other repository? If you don't have that key in use anywhere and it's still not working, let us know and we'll investigate further!


  3. Michael Frauenholtz staff

    I just saw your new message.

    I'll mark this as resolved, let us know if you have any other issues!

  4. Alex Labanino

    @Michael Frauenholtz I already removed the deployment key and still I'm getting the Someone has already registered this as a deploy key. I'm the only one using this account. Can you help me with this, please? I've been dealing with this since yesterday. I can't generate a new key because I'm using Cloud9 and I think it's not possible. Please! Thanks.

  5. Valentin Kostadinov

    I'm having the same issue. I've made sure the key has been removed from all other repositories as a deployment key. Caching problem?

  6. Eric Tucker

    Wasted 15 minutes trying to remove the deploy key so I could use as a regular key and it still complains it's in use. I saw in another thread that if it's attached to a deleted repo you are SOL.

    Atlassian you have some of the worst developers on the planet. You don't fix ANYTHING your users complain about. We've been waiting for 7 years for a cancel confirmation dialog on JIRA and that's still not fixed. Unbelievable.

  7. Alex Labanino

    I know is silly but when it happen to me was because I was doing commit and push without git init. That's why it kept telling Someone has already registered that SSH key.

  8. Mircea Nicolae

    Hi, I am just letting you know that: 1. after removing the deploy key from the repo where I have actually added it and got the ugly message that everybody else in this post got, I have discovered that 2. somehow, many other repos had that deployment key. I do not recollect ever adding it there, but if I did, my bad (I'm sure that's not the case). So all I had to to was to 3. go to all the repos and make sure that the said deployment key is not listed, after which I was able to 4. add the desired key to my account (full access key).

    My new hypothesis is that the issue is that the deployment key is added to more than one repo. Hope my update will help sone one. If it does, please reply so we can finally bring some light on this matter.


  9. Georgiana Gligor

    I get this same error. I haven't found any other repo where this is used as a deploy key, but checked them all.

    What else I can try? I can't generate and use a new key for this particular project, already tried that and its dependencies are in such a way that it's not an option.

  10. chris ju

    -I get this same error. Now i can't use Bitbuckt anymore.- I delete another developer key and the account key work.

  11. Mircea Nicolae

    Hi, Read my post above, check all your repositories and make sure that none of them have that key as a deployment key. I'm not saying you added that key to that repositories, I'm saying that was the problem in my case - check 7 posts above.

  12. Jesse Yowell Account Deactivated

    Is everyone able to see which repos have a key attached via the following command:

    ssh -T
  13. Peter Dietz

    This above advice was actually quite helpful.

    ssh -T authenticated via a deploy key. You can use git or hg to connect to Bitbucket. Shell access is disabled. This deploy key has read access to the following repositories: {{teamName}}/{{repoName}}: {{keyName}} -- {{email}}

    I then went to{{teamName}}/{{repoName}}/admin/deploy-keys/ and found which key was set as a deploy key for a repo, deleted it, and then was able to add it as a full key for my user account. Thanks for that advice.

  14. Jay Miller

    Isn't there a way to have the "Error message" tell you what repositories are using the key as a deployment key? I only have 10 or so repo's, but if I had 50-100 then fixing this would have been an even bigger headache. Seems like an easy fix to just tell me where it's at then I can go fix it easily.


  15. Christian Fries

    Thanks @jyowell that command is very helpful when you have a lot of repositories. This should be shown in the error message!

  16. Alejandro Cruz


    I have two accounts on bitbucket. Each one using different emails not related to the same organization. How is it possible that I cannot associate a same SSH key to projects on different accounts on bitbucket?! Totally non-sense.

  17. Cloud

    Thanks Jesse Yowell ! just follow his command and take a look at the message,you may find the problem.

  18. Michael Dilla

    I tried the command @jyowell posted and when I go to the link @Peter Dietz was talking about, I get a 404 error even though I have triple checked that the link is typed correct. Does anyone know how to solve this?

  19. Jesse Yowell Account Deactivated

    Michael -- Good find! We updated our links so it would be:
  20. Log in to comment