Skip to content

Commit 27c7452

Browse files
authored
repo sync
2 parents 8668cf7 + cf20fb1 commit 27c7452

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

content/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ If your instance has subdomain isolation disabled:
4545
4646
To authenticate by logging in to npm, use the `npm login` command, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your personal access token, and *PUBLIC-EMAIL-ADDRESS* with your email address.
4747
48+
If {% data variables.product.prodname_registry %} is not your default package registry for using npm and you want to use the `npm audit` command, we recommend you use the `--scope` flag with the owner of the package when you authenticate to {% data variables.product.prodname_registry %}.
49+
4850
{% if enterpriseServerVersions contains currentVersion %}
4951
If your instance has subdomain isolation enabled:
5052
{% endif %}
5153
5254
```shell
53-
$ npm login --registry=https://{% if currentVersion == "free-pro-team@latest" %}npm.pkg.github.com{% else %}npm.<em>HOSTNAME</em>/{% endif %}
55+
$ npm login --scope=@<em>OWNER</em> --registry=https://{% if currentVersion == "free-pro-team@latest" %}npm.pkg.github.com{% else %}npm.<em>HOSTNAME</em>/{% endif %}
56+
5457
> Username: <em>USERNAME</em>
5558
> Password: <em>TOKEN</em>
5659
> Email: <em>PUBLIC-EMAIL-ADDRESS</em>
@@ -60,7 +63,7 @@ $ npm login --registry=https://{% if currentVersion == "free-pro-team@latest" %}
6063
If your instance has subdomain isolation disabled:
6164
6265
```shell
63-
$ npm login --registry=https://<em>HOSTNAME</em>/_registry/npm/
66+
$ npm login --scope=@<em>OWNER</em> --registry=https://<em>HOSTNAME</em>/_registry/npm/
6467
> Username: <em>USERNAME</em>
6568
> Password: <em>TOKEN</em>
6669
> Email: <em>PUBLIC-EMAIL-ADDRESS</em>

0 commit comments

Comments
 (0)