Missed access to all my repositories (conq: repository access denied. deployment key is not associated with the requested repository.)

Issue #7235 resolved
Alex Sidorov
created an issue


I receiving:

conq: repository access denied. deployment key is not associated with the requested repository. fatal: The remote end hung up unexpectedly

for all my repostories. I created new key, added to my account (not as deployment key, but as my public key) and have the same issue.

I can't push, pull or clone. ssh test passed well.

Everything was working well about 1 week ago.

My account is asidorov01.

Thank you guys.

Comments (31)

  1. Brodie Rao

    Hi Alex,

    The error message we're presenting isn't exactly correct, but what it's trying to say is that it doesn't recognize your SSH key at all.

    Can you double check that the key your client is offering is the one associated with your account? You should be able to see that by running "ssh -v git@bitbucket.org".

    Also, did you happen to add a second key to your SSH client one week ago? If you're using ssh-agent, it's only going to offer up one of those keys, no matter what ~/.ssh/config says about what key to use for what host. You can work around that with the IdentitiesOnly SSH option, but that'll make it impossible to use ssh-agent for that host/key.

  2. Alex Sidorov reporter

    Hello, looks like I had the same issue as others.

    I launched ssh -v git@bitbucket.org. And I saw that from your side was deployment key, instead my public key. Luckily I had admin rights and delete this repository, create again and it's working now.

    Thanks, issue is solved for me. I don't know how to reproduce this for future fixes.

  3. Dmitry

    I have this problem after add in other repository different public key.

    I solve this problem - delete other public keys in repositories.

  4. Bonnie Souter

    I had this problem. I found the key I was trying to use was a deployment key in another repository. I deleted the deployment key from the other repository and was able to use the same key as the full access key for the original.

  5. Bonnie Souter

    Apparently you cannot use the same key as a deployment key for one repo and a full access key for another. Should be fine if they are different keys AND different repos.

  6. Stuart Longland

    I just struck this same error message out of the blue today. Had me scratching my head and thinking: "but it isn't a deployment key?!"

    ssh -v git@bitbucket.org gave me a clue, OpenSSH was offering up the wrong key. I have a couple of keys, and maybe it was getting the right one first time by fluke or the server was rejecting that key before, however now it decided to "accept" the key (from an OpenSSH standpoint) but then reject my key (from a git standpoint).

    All rather confusing.

    The workaround I've put in place is the following:

    Host bitbucket.org
        IdentityFile ~/.ssh/bitbucket

    Put that in ${HOME}/.ssh/config then you know what key is being offered up.

  7. Saigon

    Same problem for me. I deleted and recreate repository but when I add deployment key, access denied for all of my repositories. Before adding deployment key, all of accesses are fine.

  8. Artur Grigio

    I had the same problem. My issue was that I added the key as a deployment key on the repo itself

    YOUR_REPO>Settings>Deployment Keys

    Once I added the key through

    Profile>Bitbucket Settings>SSH Keys

    I got all my Clone/Push rights

  9. Saigon

    In my situation, I delete and reload my ssh key of client machine then I could access to bitbucket.

    ssh-add -D
    ssh-add <PATH-TO-YOUR-KEY>
  10. Mike Kasprzak

    Oh gawd, I spent way too many days trying to figure out how to get my deployment keys working. I know way too much about SSH keys now... only to discover I made the noob'ish of mistakes.

    My mistake: sudo

    I was using sudo in front of my git commands, which in turn caused them to use root's SSH keys, and not my user's keys.

    It's okay, you can laugh. I'm laughing... maybe slightly crying too. 😂

  11. faizan

    @Stuart Longland your method worked The reason is when we add deployment key and ssh to bitbucket it takes the public key from default location


    , so we gotta say our Mac/Linux that please take the new public key which I created newly(Create new ssh key other than the previous one). Hence we have to add that in config file as shown by @Stuart Longland

    Thanks a lot.

  12. Log in to comment