New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.npmrc 'cafile' option should be honored by binary postinstall #8825
Labels
package manager: npm
Issues relating to npm
Comments
minijus
added a commit
to minijus/cypress
that referenced
this issue
Oct 17, 2020
1 task
minijus
added a commit
to minijus/cypress
that referenced
this issue
Oct 18, 2020
minijus
added a commit
to minijus/cypress
that referenced
this issue
Apr 20, 2021
minijus
added a commit
to minijus/cypress
that referenced
this issue
May 10, 2021
Introduce new env variable `CYPRESS_DOWNLOAD_USE_CA`. When set `cypress` post-install will respect `ca` and `cafile` properties set on npm config. Closes cypress-io#8825
The code for this is done in cypress-io/cypress#8877, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current behavior
When developing, it is very convenient to have a repository-defined
.npmrc
file with all the custom options. We use self-signed certificates for the binary repository mirror which we have set viacypress_download_mirror
in the.npmrc
. We also havecafile
set to our root certificate file and use that when runningnpm install
and such.When running
npm install cypress
- the https://github.com/cypress-io/cypress/blob/develop/cli/lib/tasks/download.js ignores thecafile
configuration even if it exists and only takes the environment configuration.A workaround is to set the
NODE_EXTRA_CA_CERTS
variable, but that is a global solution and we might have several separate cafiles for different projects.Desired behavior
https://github.com/cypress-io/cypress/blob/develop/cli/lib/tasks/download.js should honor the
cafile
configuration and use the specified certificate if it is set in the.npmrc
configuration when it is being run.Test code to reproduce
Not easy to reproduce via a singular repo (requires self-signed certificates and registries). Will try to do it if needed.
The text was updated successfully, but these errors were encountered: