HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

npm adduser — Add a registry user account. More information: <https://docs.npmjs.com/cli/npm-adduser/>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
registrycommandaccountclinpm adduseraddusermore

Problem

How to use the npm adduser command: Add a registry user account. More information: <https://docs.npmjs.com/cli/npm-adduser/>.

Solution

npm adduser — Add a registry user account. More information: <https://docs.npmjs.com/cli/npm-adduser/>.

Create a new user in the specified registry and save credentials to .npmrc:
npm adduser --registry {{registry_url}}


Log in to a private registry with a specific scope:
npm login --scope {{@organization}} --registry {{https://registry.example.com}}


Log out from a specific scope and remove the auth token:
npm logout --scope {{@organization}}


Create a scoped package during initialization:
npm init --scope {{@organization}} {{[-y|--yes]}}

Code Snippets

Create a new user in the specified registry and save credentials to `.npmrc`

npm adduser --registry {{registry_url}}

Log in to a private registry with a specific scope

npm login --scope {{@organization}} --registry {{https://registry.example.com}}

Log out from a specific scope and remove the auth token

npm logout --scope {{@organization}}

Create a scoped package during initialization

npm init --scope {{@organization}} {{[-y|--yes]}}

Context

tldr-pages: common/npm adduser

Revisions (0)

No revisions yet.