ERRO[0004] tls: failed to parse private key

as per below description, i followed below procedure but still i am getting error

ERRO[0004] tls: failed to parse private key
**Support portal Reference:-**
import http from "k6/http";

export let options = {
  tlsAuth: [
      domains: [ "" ],
      cert: open("./mycert.pem"),
      key: open("./mycert-key.pem"),

export default function() {

could support team suggest how to resolve this issue

Hi @gjagan,

I edited your post in order for it to be better formatted, but have no idea where **Support portal Reference:-** comes from and what it means …

From the error it looks like you have problems with your key. Can you check that :

  1. there is mycert-key.pem file in the same directory as your script
  2. check that this is actually the key of the certificate and it can be read … with for example openssl on the command line