Connecting to remote AWS database, RSA private key errors

Answered

Using the same key file that works to connect remotely using pgAdmin4 I get the following error trying to connect with pyCharm:

[08006] SSL error: java.lang.RuntimeException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Header and footer do not match: -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE KEY----------END CERTIFICATE-----

My .pem file does not have ------END CERTIFICATE----- at the end so I tried adding it but then I get this error:

[08006] SSL error: java.lang.RuntimeException: java.security.cert.CertificateParsingException: signed overrun, bytes = 920

Please sign in to leave a comment.