From 5c9eb3f09f94e86a7ad29ad94033f6b60bd74d39 Mon Sep 17 00:00:00 2001 From: Dak Washbrook Date: Fri, 15 Oct 2021 11:03:39 -0700 Subject: [PATCH 1/2] CAFILE environment variable --- source/expired-certificate.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/expired-certificate.md b/source/expired-certificate.md index bc52f3790..20a0775ed 100644 --- a/source/expired-certificate.md +++ b/source/expired-certificate.md @@ -19,7 +19,19 @@ Older versions of Meteor, more specifically anything older than Meteor v1.9 ship If you are getting errors like Connection error (certificate has expired) when running Meteor commands it means that you are running a version of Meteor older than v1.9. -A workaround, for now, is to run all the meteor commands with the following environment variable ***NODE_TLS_REJECT_UNAUTHORIZED***, for example in the deploy command: +In Meteor v1.3 and later you will be able to specify the `CAFILE` that Meteor uses on the CLI. + +``` +CAFILE="/path/to/ISRG_Root_X1.pem" +``` + +A similar environment variable is also available in NodeJS from v7.3.0 and later (https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file) give you are having any issues on that level. + +``` +NODE_EXTRA_CA_CERTS="/path/to/ISRG_Root_X1.pem" +``` + +Another workaround, [not recommended by NodeJS](https://nodejs.org/api/cli.html#cli_node_tls_reject_unauthorized_value), is to run all the meteor commands with the following environment variable ***NODE_TLS_REJECT_UNAUTHORIZED***, for example in the deploy command: ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 meteor deploy From d3858a0fb1312235d799b4621a46c2e52475bb4a Mon Sep 17 00:00:00 2001 From: Dak Washbrook Date: Fri, 22 Oct 2021 11:53:04 -0700 Subject: [PATCH 2/2] Update expired-certificate.md --- source/expired-certificate.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/expired-certificate.md b/source/expired-certificate.md index 20a0775ed..db80ec4f6 100644 --- a/source/expired-certificate.md +++ b/source/expired-certificate.md @@ -19,19 +19,21 @@ Older versions of Meteor, more specifically anything older than Meteor v1.9 ship If you are getting errors like Connection error (certificate has expired) when running Meteor commands it means that you are running a version of Meteor older than v1.9. -In Meteor v1.3 and later you will be able to specify the `CAFILE` that Meteor uses on the CLI. +In Meteor v1.3 and later you will be able to specify the environment variable `CAFILE` that Meteor uses on the CLI. ``` -CAFILE="/path/to/ISRG_Root_X1.pem" +CAFILE="/etc/ssl/certs/ISRG_Root_X1.pem" ``` +You can have this certificate installed by installing the `ca-certificates` package for your distro. + A similar environment variable is also available in NodeJS from v7.3.0 and later (https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file) give you are having any issues on that level. ``` NODE_EXTRA_CA_CERTS="/path/to/ISRG_Root_X1.pem" ``` -Another workaround, [not recommended by NodeJS](https://nodejs.org/api/cli.html#cli_node_tls_reject_unauthorized_value), is to run all the meteor commands with the following environment variable ***NODE_TLS_REJECT_UNAUTHORIZED***, for example in the deploy command: +Another workaround, [not recommended by NodeJS](https://nodejs.org/api/cli.html#cli_node_tls_reject_unauthorized_value), is to run all the meteor commands with the following environment variable `NODE_TLS_REJECT_UNAUTHORIZED`, for example in the deploy command: ```bash NODE_TLS_REJECT_UNAUTHORIZED=0 meteor deploy