The exact steps to publish a package was not documented with the new 2fa requirement
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:
- create a token with access to everything and with the longest expiration date possible
- Modify ~/.npmrc
- The second line should be this:
//registry.npmjs.org/:_authToken=YOUR_TOKEN
- The second line should be this:
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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