Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku No valid, non-passphrase-protected keys given error

Tags:

heroku

I have this files:

AddTrustExternalCARoot.crt
STAR_mydomain_com.crt
TrustedSecureCertificateAuthority5.crt
USERTrustRSAAddTrustCA.crt
domain.key

domain.key is passphrase protected and it was generated during creation of CSR files (files that were required to get .crt files from certificate provider. I tried:

heroku certs:update certs/STAR_mydomain_com.crt certs/domain.key

But I get following error:

 !    No valid, non-passphrase-protected keys given.

How I can generate valid crt/key for heroku? (I tried all other crt files with domain key but they are not valid domain certificates.


domain.key was generated with following command:

openssl genrsa -des3 -out domain.key 2048
like image 664
user606521 Avatar asked Sep 10 '14 17:09

user606521


1 Answers

Here's how to remove a passphrase from a private key:

openssl rsa -in certs/domain.key -out certs/domain-nopassphrase.key

You'll need to enter the current passphrase on the private key. If prompted for a passphrase on the new key, do not enter one (just press enter).

You can then update your SSL endpoint using your cert + this new key:

heroku certs:update certs/*.crt certs/domain-nopassphrase.key
like image 89
wuputah Avatar answered Oct 12 '22 00:10

wuputah