We recently had user1 leave our company and we've discovered that they were using the public SSH key of our Bamboo server in their BitBucket account. Bamboo builds were running fine until he left and the company that owned the BitBucket repo removed user1's access.
I've logged into our admin BitBucket account and tried to add the bamboo public key to the SSH Key list, but I get this error: "Someone has already added that SSH key."
(I know I could regenerate a new key, but it's used in several other places already)
When I run this command (ssh -T git@bitbucket.org) from the Bamboo server, I get:
"logged in as user1
You can use git or hg to connect to Bitbucket. Shell access is disabled"
I reset the credentials to user1's BitBucket account to see if I can remove the SSH Key from his profile, but it appeared to not have any SSH Keys (maybe he deleted them when he left?). I then read somewhere that the best option is to delete the user1 BitBucket account, which I did, but I guess it can take up to 14 days for it to actually delete.
Builds are failing, so a quicker fix would be greatly appreciated. I think I just need to figure out how to log user1 out of BitBucket?
Thanks for any help in advance!
Hello @Jon Tice,
I reset the credentials to user1's BitBucket account to see if I can remove the SSH Key from his profile, but it appeared to not have any SSH Keys (maybe he deleted them when he left?)
In this case you wouldn't get an error when adding the same SSH key to another Bitbucket account (you referred as "admin account" to). Adding/removing SSH keys from an account happens immediately, so my assumption is that the key is still there – can you double check that?
I think I just need to figure out how to log user1 out of BitBucket?
There's no way to log someone out, but this is not an issue in your case. SSH key doesn't disappear when a user logs in or out. Basically, "Someone has already added that SSH key." error means that there's a conflicting record in Bitbucket: SSH key should be unique.
Unfortunately I don't have enough information to check things on our side. Please open a support case with us where you can privately share the details on the user and SSH key in question, so that we can look it up in our records.
Let me know if you have any questions.
Cheers,
Daniil
I double checked that there were no keys listed under the SSH Keys page for user1's BitBucket account before we deleted the account.
I guess I'm just not sure who else it could be if it shows user1's name when I run the "ssh -T git@bitbucket.org" command.
I opened a ticket with support and will follow up here once we can figure it out.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It turns out the user had two BitBucket accounts, which Atlassian Support was able to figure out for me after I provided the public key to them in a ticket that I opened. I removed the SSH key from user1's second account and then added it to the admin account.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.