npm / npm/documentation

The exact steps to publish a package was not documented with the new 2fa requirement

Open
#1,857 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
712
Forks
4.2k
Avg merge
4d 16h
Merged PRs (30d)
3

Description

The updated flow is this:

  1. create a token with access to everything and with the longest expiration date possible
  2. Modify ~/.npmrc
    • The second line should be this: //registry.npmjs.org/:_authToken=YOUR_TOKEN
  3. npm publish (now it should work)

One concern: I use a password manager (GNUPass), which is more secure than storing tokens in plaintext config files. Which feels like a step backward security-wise. Would be great if there were better integration options for users with existing secure credential management.

(Or allow other 2fa options, FIDO2 is not an option.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the package-publishing documentation in this repository and compare it with the updated npm 2FA flow described in the issue. Document the token creation, ~/.npmrc entry, and npm publish steps, while preserving the stated concern about plaintext token storage; done when the publish instructions are accurate and the security caveat is represented.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.