Adding a new SSH Key fails

Hi everyone,

I am having an issue which might be similar to this.

I have some python code that I want to send to a server via SSH. The test are passing, and I obviously need to add the SSH key to CircleCI. The problem is that when I paste my private key, and hit “Add SSH Key”, the button just goes to “Saving…” for a couple of seconds, then reads “Failed”.

I am almost sure I am doing everything right, I am copying the key from -----BEGIN RSA PRIVATE KEY----- to -----END RSA PRIVATE KEY-----, and I generate it using ssh-keygen -t rsa -b 4096 -C "". Is it supported? Should I change the way I generate it or is it just a temporary bug?

Thank you for your help,

If you are using RSA keys it should totally work. Can you check the browser console to see if there is any additional logging or errors?

Problem solved. I got a 400 error with the following body:

    "message": "it looks like this key is encrypted: we don't support password-protected keys"

So I decrypted the key and now it works… My bad, I should have tried harder, thanks a lot for your help!

1 Like

My pleasure! Glad you were able to figure this out.

Sadly, no great way to support encrypted keys right now. :frowning:

I’m getting a bad request error: Failed to load resource: the server responded with a status of 400 (Bad Request)

Is there something wrong with my request or do you guys have a bug on your side? I’m adding a rsa key

I get the same 400 error message with the following response body

{“message”:“the hostname isn’t valid. Try checking this Wikipedia article for hostname restrictions:”}

The problem is that the key is generated with a valid email address that has got a valid hostname so what can I do?

how did you decrpyt it?

any fix on this, im having the same 404

Try to change the hostname. No underscores or any other special characters.

I’m having the same 400 error. Tried changing the hostname, still not working.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.