On chrome, when you open the network tab in dev tools, what is the content of the body of the 400 response? That should help us figure out what’s wrong here.
Even adding the private key gives me the same error.Am i missing something here?.Do we need to remove the encryption type mentioned in the private key.
For anyone still struggling with this, are you using encryption types other than rsa? I was scratching my head for a while because I mostly use ed25519 these days, tried creating an rsa one and worked like a charm.
I used PUTTYGEN to generate a pair of public and private keys (with no passphrase) that look like this:
I tried to put the public lines above, then tried then private line (14 lines) below (excluding the Private-MAC line). Neither worked.
Some observations:
Passphrase: I am not sure if the PEM file had a passphrase. But when I opened it with PUTTYGEN, the passphrase box was empty. I then saved public and private keys without entering anything there.
For the hostname area. I left it empty.
(I use Bitbucket, but I am not sure what its host name is)
I’d advise you to follow a guide on generating a key-pair in Linux, so you can see what a working pair looks like, and then translate it back to PuTTY if it is important for you to do it there.
On Windows, you can get a working Linux terminal using Vagrant very easily - it downloads a basic Ubuntu box for you.
If you are still stuck, then:
Generate a test key pair that you can throw away
Show us both halves of the pair, unredacted (making sure it is removed from any of your repo/CI providers).
Paste the keys as text, not images. Images are not compatible with clipboards, and make it harder to help you.
That will allow someone to try the key in their own CI temporarily.