docs: bring back certfile (#8582) · npm/cli@7a09902 · GitHub
Skip to content

Commit 7a09902

Browse files
authored
docs: bring back certfile (#8582)
Partial revert of #7947 `certfile` and `cafile` are both valid, and are used for different things: - `certfile` is the path to the certificate file. It's used for mutual TLS and represents the client's certificate (supersedes the deprecated `cert`, and complements `keyfile`). - `cafile` is the path to the certificate authority file. It's used to verify the authenticity of the registry's certificate. Also clarify that `keyfile` and `certfile` must be scoped to a registry.
1 parent 5db81c3 commit 7a09902

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

docs/lib/content/configuring-npm/npmrc.md

Lines changed: 4 additions & 3 deletions

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,9 +1911,9 @@ When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`.
19111911
* Default: null
19121912
* Type: null or String
19131913
* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry
1914-
operations. Use registry scoped \`keyfile\` and \`cafile\` instead. Example:
1914+
operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example:
19151915
//other-registry.tld/:keyfile=/path/to/key.pem
1916-
//other-registry.tld/:cafile=/path/to/cert.crt
1916+
//other-registry.tld/:certfile=/path/to/cert.crt
19171917
19181918
A client certificate to pass when accessing the registry. Values should be
19191919
in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
@@ -1924,8 +1924,8 @@ cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----"
19241924
\`\`\`
19251925
19261926
It is _not_ the path to a certificate file, though you can set a
1927-
registry-scoped "cafile" path like
1928-
"//other-registry.tld/:cafile=/path/to/cert.pem".
1927+
registry-scoped "certfile" path like
1928+
"//other-registry.tld/:certfile=/path/to/cert.pem".
19291929
19301930
19311931
@@ -2016,9 +2016,9 @@ Alias for \`--init-version\`
20162016
* Default: null
20172017
* Type: null or String
20182018
* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry
2019-
operations. Use registry scoped \`keyfile\` and \`cafile\` instead. Example:
2019+
operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example:
20202020
//other-registry.tld/:keyfile=/path/to/key.pem
2021-
//other-registry.tld/:cafile=/path/to/cert.crt
2021+
//other-registry.tld/:certfile=/path/to/cert.crt
20222022
20232023
A client key to pass when accessing the registry. Values should be in PEM
20242024
format with newlines replaced by the string "\\n". For example:

workspaces/config/lib/definitions/definitions.js

Lines changed: 5 additions & 5 deletions

0 commit comments

Comments
 (0)