I am having the following error while trying to do API testing of a site having SSL certificate validation required.
Failed to load client certificates for clientCertificates[0]: Cannot parse PEM key: Could not convert private key from PEM; PEM header type is not “PRIVATE KEY” or “RSA PRIVATE KEY”.. For more debug details run Cypress with DEBUG=cypress:server:client-certificates*
This is the code in my cypress.config.js file:
clientCertificates: [
{
url: 'https://My_URL',
ca: [],
certs: [
{
cert: 'cypress/certs/cert.crt',
key: 'cypress/certs/cert.pem',
},
],
},
],
If you know how to config SSL certificate in cypress or any other workaround for this it will be very useful to me.
I was trying to do API testing using cypress and my site requires SSL certificates so I added them following the configuration guidelines of cypress for this but I am getting this error. I was expecting it to run without any errors
ABHIJEET KUMAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.