-
-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid enabling 2FA for packages published to external registries #433
Avoid enabling 2FA for packages published to external registries #433
Conversation
External registry don't all support two-factor authentication. For example, when using [Nexus as npm registry](https://blog.sonatype.com/using-nexus-3-as-your-repository-part-2-npm-packages), the command ```bash > npm profile enable-2fa ``` fails with ``` npm ERR! code E400 npm ERR! 400 Bad Request - POST http://nexus.../content/groups/npm-all/-/npm/v1/tokens npm ERR! A complete log of this run can be found in: npm ERR! ...npm/_logs/2019-06-20T09_24_05_833Z-debug.log ``` This change disables the two-factor authentication task for external registry so that we can continue to publish packages on Nexus.
I wonder if any private registries support 2FA other than npm? If so, maybe it's be worth it to add some logic to check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as a temporary solution to the issue, however I'd like to see what @sindresorhus has to say about this before merging the PR.
Can you mention in small text under |
done in e263ff6 |
Fix styling.
Thanks @oligot! |
🙌 |
External registry don't all support two-factor authentication.
For example, when using Nexus as npm registry, the command
> npm profile enable-2fa
fails with
This change disables the two-factor authentication task for external registry so that we can continue to publish packages on Nexus.