This is for those who have had trouble setting up private keys following the PEM format on Heroku Dyno. These keys have the following structure:
-----BEGIN {SOME KEY TYPE}-----
{string representation of key}
-----END {SOME KEY TYPE}-----
When you get this kind of key from some service, such as a key file from a GCP/AWS service account, you would usually get it as a string literal, like the following: