Fix duplicate SSH key and access key issue?

How can I find where I've accidentally used my personal SSH key as an access key on a project?

It looks like something has changed in BitBucket where I now can't do anything with my account with SSH. I am getting this error from the command line:

"$ git pull
Warning: Permanently added ',' (RSA) to the list of known hosts.
repository access denied. deployment key is not associated with the requested repository.
fatal: Could not read from remote repository.

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

Last time I tried anything and it all worked was last Tuesday.


Problem is that I've got 200 repos and I'm not sure I want to go through and check the access keys for each one in case I've duplicated my personal SSH key there. Is there any way to fix this more easily...if this is indeed the problem?


1 answer

1 accepted

0 votes
Accepted answer
Jim Redmond Atlassian Team Sep 04, 2017

`ssh -Ti /path/to/key` should tell you which account or repos, if any, are associated with a particular key.

Hi James,

Thanks for your quick reply. I gave that a go and do indeed get a response with a repo and access key label in it. However, it does not match my key.

Anything else you can suggest?

It's ok, fixed. Thank you!

In my case this returns a user 'xyz' that I may have used in the past, but cannot reach anymore. So I cannot remove the ssh key from that user. What to do?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

659 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you