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

Fix duplicate SSH key and access key issue?

kieranshaw-connect September 4, 2017

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 'bitbucket.org,104.192.143.1' (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

1 vote
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2017

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

kieranshaw-connect September 5, 2017

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?

kieranshaw-connect September 5, 2017

It's ok, fixed. Thank you!

Fryske Akademy October 12, 2017

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
TAGS
AUG Leaders

Atlassian Community Events