Skip to content

Commit c8c8d2d

Browse files
committed
[docs] Update 2FA requirements for npm publish documentation
1 parent 9cbff80 commit c8c8d2d

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

content/cli/v10/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ npm publish <package-spec>
2929

3030
Publishes a package to the registry so that it can be installed by name.
3131

32+
<Note>
33+
3234
**Important:** Publishing to npm requires either:
3335
- Two-factor authentication (2FA) enabled on your account, OR
3436
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
3537

36-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
38+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
39+
40+
</Note>
3741

3842
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v10/using-npm/scope) in the name, combined with a scope-configured registry (see [`package.json`](/cli/v10/configuring-npm/package-json)).
3943

content/cli/v11/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ npm publish <package-spec>
4545

4646
Publishes a package to the registry so that it can be installed by name.
4747

48+
<Note>
49+
4850
**Important:** Publishing to npm requires either:
4951
- Two-factor authentication (2FA) enabled on your account, OR
5052
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
5153

52-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
54+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
55+
56+
</Note>
5357

5458
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v11/using-npm/scope) in the name, combined with a scope-configured registry (see [`package.json`](/cli/v11/configuring-npm/package-json)).
5559

content/cli/v6/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ Sets tag 'latest' if no --tag specified
3232
3333
Publishes a package to the registry so that it can be installed by name. All files in the package directory are included if no local `.gitignore` or `.npmignore` file exists. If both files exist and a file is ignored by `.gitignore` but not by `.npmignore` then it will be included. See [`developers`](/cli/v6/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built.
3434
35+
<Note>
36+
3537
**Important:** Publishing to npm requires either:
3638
- Two-factor authentication (2FA) enabled on your account, OR
3739
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
3840
39-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
41+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
42+
43+
</Note>
4044
4145
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v6/using-npm/scope) in the name (see [`package.json`](/cli/v6/configuring-npm/package-json)).
4246

content/cli/v7/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ Sets tag 'latest' if no --tag specified
3232
3333
Publishes a package to the registry so that it can be installed by name.
3434
35+
<Note>
36+
3537
**Important:** Publishing to npm requires either:
3638
- Two-factor authentication (2FA) enabled on your account, OR
3739
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
3840
39-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
41+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
42+
43+
</Note>
4044
4145
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v7/using-npm/scope) in the name (see [`package.json`](/cli/v7/configuring-npm/package-json)).
4246

content/cli/v8/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ npm publish <package-spec>
2929

3030
Publishes a package to the registry so that it can be installed by name.
3131

32+
<Note>
33+
3234
**Important:** Publishing to npm requires either:
3335
- Two-factor authentication (2FA) enabled on your account, OR
3436
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
3537

36-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
38+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
39+
40+
</Note>
3741

3842
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v8/using-npm/scope) in the name, combined with a scope-configured registry (see [`package.json`](/cli/v8/configuring-npm/package-json)).
3943

content/cli/v9/commands/npm-publish.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ npm publish <package-spec>
2929

3030
Publishes a package to the registry so that it can be installed by name.
3131

32+
<Note>
33+
3234
**Important:** Publishing to npm requires either:
3335
- Two-factor authentication (2FA) enabled on your account, OR
3436
- A granular access token with bypass 2FA enabled (for CI/CD workflows)
3537

36-
For more information, see the npm documentation on [requiring 2FA for package publishing](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification).
38+
For more information, see the npm documentation on [requiring 2FA for package publishing](/requiring-2fa-for-package-publishing-and-settings-modification).
39+
40+
</Note>
3741

3842
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a [`scope`](/cli/v9/using-npm/scope) in the name, combined with a scope-configured registry (see [`package.json`](/cli/v9/configuring-npm/package-json)).
3943

0 commit comments

Comments
 (0)