When adding SSH keys under "Project Settings > SSH Keys > Additional SSH Keys", you may encounter the following error:
"It looks like this private key is invalid. Please check if you have pasted the right key. If you are sure your key is valid, please contact support for assistance."
This can happen if the key is either:
- Not in PEM format.
If your private key does not start with
-----BEGIN RSA PRIVATE KEY-----, enforce PEM format by generating the key with
ssh-keygen -m PEM -t rsa -C "firstname.lastname@example.org"
- Protected by a passphrase.
Since CircleCI cannot decrypt SSH keys, every new key must have an empty passphrase.
Please see our documentation for more information on Adding an SSH Key to CircleCI.