surge icon indicating copy to clipboard operation
surge copied to clipboard

PEM file not applied

Open trevorblades opened this issue 8 years ago • 20 comments

When I run surge ssl with my certificate, I get a non-descriptive error saying:

Error - something went wrong. the pem file was not applied

I was able to successfully apply SSL certs to my domains a few months ago, but now it's not working. Any thoughts on what might be going on here?

This was also recently reported on Twitter https://twitter.com/davidweisss/status/755553830129897473

trevorblades avatar Jul 21 '16 03:07 trevorblades

Also getting this error. There doesn't appear to be a way around it as I've tried with certs from several CAs.

@trevorblades did you manage to resolve?

stuartbreckenridge avatar Aug 19 '16 14:08 stuartbreckenridge

@stuartbreckenridge I didn't. I ended up switching over to AWS 😞

trevorblades avatar Aug 23 '16 22:08 trevorblades

@trevorblades Same...I moved to netlify.

stuartbreckenridge avatar Aug 23 '16 22:08 stuartbreckenridge

Sorry you both had issues. This is usually due to the order of your certs in your PEM file.

sintaxi avatar Aug 23 '16 22:08 sintaxi

My PEM file was:

My certificate Rapid SSL Intermediate Private Key

This failed, but so did all (5) other combinations possible.

On 24 Aug 2016, at 6:31 am, Brock Whitten <[email protected]mailto:[email protected]> wrote:

Sorry you both had issues. This is usually due to the order of your certs in your PEM file.

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sintaxi/surge/issues/219#issuecomment-241901038, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGuF_JP_Y1U9m0QVy1oRNmN_H50WsCehks5qi3SwgaJpZM4JRZwe.

stuartbreckenridge avatar Aug 23 '16 23:08 stuartbreckenridge

@stuartbreckenridge what you did seems right. There must be something else causing the error. We will dig further into this. Thanks for following up and reporting the issue.

sintaxi avatar Aug 24 '16 00:08 sintaxi

I'm getting the same issue

famulus avatar Sep 02 '16 01:09 famulus

+1 Same error here.

PEM file:

Certificate Private key

calvinbrewer avatar Oct 27 '16 21:10 calvinbrewer

Same error here. Have the problem with a number of domains, and all permutations of .key and .crt files within the .pem

jmspswny avatar Jan 26 '17 21:01 jmspswny

I had a similar problem while using let's encrypt. I found this digital ocean let's encrypt tutorial helpful. Surge uses digital ocean, so any info on how to get your cert on digital ocean will probably apply to surge.

tigarcia avatar Feb 18 '17 02:02 tigarcia

what's the status on this issue?

matteodem avatar Mar 14 '17 20:03 matteodem

I also had this issue, am using SSLMate cert. My problem was that I had the order wrong when I concatenated. The order should be:

cat mydomain.crt mydomain.chain.crt mydomain.key > surge.pem

This worked for me, basically the ".chain" crt was an intermediary cert so start with your main domain cert, then do each intermediary cert, finally include your key file.

srobertson421 avatar May 09 '17 18:05 srobertson421

I'm having this same issue today trying to upload a new certificate to an account that already had one (and that has now expired.) It's using a LetsEncrypt cert. I've tried:

cat fullchain.pem privkey.pem > surge.pem cat cert.pem privkey.pem > surge.pem cat cert.pem chain.pem privkey.pem > surge.pem

In every case running the surge ssl command w/ the pem file results in:

Error - the pem file was not applied

I'm pretty sure I followed the same process for uploading the original cert so I don't know why it's failing now. It'd be nice if the error output gave some indication of what the error is and not just that there's an error.

tylerdave avatar Jun 17 '17 17:06 tylerdave

@tylerdave if you're able to hop into slack I can help you.

sintaxi avatar Jun 17 '17 17:06 sintaxi

I am having the same issue. I've tried running surge ssl and going through the prompts - resulting in Error - the pem file was not applied.

I also tried surge --pem surge.pem --domain https://mydomain.com - resulting in Success! Project is published and running at mydomain.com

I followed the surge ssl guide and have also tried this person's guide.

@sintaxi - any advice?

nickFalcone avatar Aug 30 '18 00:08 nickFalcone

@nickFalcone can you email [email protected] with more details such as your domain and Certificate Authority if you have one?

sintaxi avatar Aug 30 '18 00:08 sintaxi

@sintaxi I'm having the same issue as @nickFalcone and contacted your support 4days ago as you suggested. I still didn't receive any feedback and my issue is not resolved.

@nickFalcone Is you issue resolved now? Thanks!

Sewdn avatar Sep 03 '18 14:09 Sewdn

We're having this issue with Let's Encrypt certs.

guyjacks avatar Jun 05 '19 19:06 guyjacks

Here's a good guide https://community.letsencrypt.org/t/adding-certbot-ssl-certification-to-custom-domain-on-surge/88241

marcelocpinheiro avatar Jun 16 '20 21:06 marcelocpinheiro

Anyone found a fix for this?

arturojain avatar Nov 25 '23 13:11 arturojain