Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I'm following the instructions for adding a new SSH key to my repo but no matter what I do I keep getting the error: "That access key is invalid."
Hello @Darrell Brogdon,
Thanks for reaching out.
Aren't you trying to register your private key by any chance, not the public one? You'll get this error if you try adding your private key. You should be adding the corresponding public key to Bitbucket.
Bitbucket supports four encryption algorithms for SSH keys: Ed25519, ECDSA, RSA, and DSA. The message you mentioned generally means that your key isn't using one of these algorithms or is malformed.
Hope this helps.
Cheers,
Daniil
The key may also be in an unrecognized format, or it may be the wrong size (RSA keys must be at least 2048 bits; ECDSA must be 256, 384, or 521 bits; and DSA must be 1024 bits but don't use that because it's quite insecure).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you solve this problem successfuly @Darrell Brogdon ?
I pasted the data below to the textbox (some letters replaced with XXX)
ssh-rsa
AAAAB3NzaC1yc2EAAAABJQAAAQEAk/ugnFio9rj3+fkMaNwYz5miM1xjAEsePmfQQXTk25ug/EljYLBNFXpZys/UljEC+SFaydgUnEPMq/r8QgI8VajsJqutG8jMosFyvk65wgL2RzEyZdHvTtsxyuhVr6DvHtT6A4Jm6WwL1sq2lzRORh6GX1MIt7MzW2+2gCYZ8OvPfJxFfBh0bDBvUl4ebvhk8bDCtD7BH+VeT7xd13LdL54UxnD/FuaeAemXkP9E6V6RTMleR9wsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXj2rf2EaiNsl5mS+fLNzSkt6UNCaH4Nwp8vXU7EIBCSo+ySy87j6UE+8B/FJwQ==
This was generated with Putty Agent, RSA 2048 bits. I put the word ssh-rsa at the top. The key name is @"20202_XXXLaptopDevMachine". Same error @"That access key is invalid."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @freelensia,
I put the word ssh-rsa at the top
I'm not sure what you meant here. The public key should be a single line, like this:
ssh-rsa <encoded key> <optionally, your email>
It's hard to tell what is wrong with your key given that you replaced some letters there, so I can't validate it. It is actually safe to publish your public key – that's why it is called public. What you should never share is your corresponding private key.
The safest option is just to find the key file on your disk, open it with a text editor and copy the content.
Hope this helps.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Daniil Penkin , the problem was that I tried to copy the key from a text editor. This was not accepted by Bitbucket. I needed to load the key via PuttyGen Agent then copy the text generated there. This was not mentioned in the guide at https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html.
Thanks for offering to help.
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.