You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If someone has enabled two factor authentication for their npm account, running npmpub command will fail with the following error.
npm ERR! code EOTP
npm ERR! This operation requires a one-time password from your authenticator.
npm ERR! You can provide a one-time password by passing --otp=<code> to the command you ran.
npm ERR! If you already provided a one-time password then it is likely that you either typoed
npm ERR! it, or it timed out. Please try again.
a workaround for this issue is to set the one time password via the environment variable (NPM_CONFIG_OTP=123456) when calling the npmpub cli. But in a lot of repos npm install & npm test alone will take more than the life time of the one time password.
It would be helpful if right before the npm publish, user would be prompted to enter their otp in the cli.
If you are interested, i can provided a PR.
The text was updated successfully, but these errors were encountered:
If someone has enabled two factor authentication for their npm account, running
npmpub
command will fail with the following error.a workaround for this issue is to set the one time password via the environment variable (
NPM_CONFIG_OTP=123456
) when calling the npmpub cli. But in a lot of reposnpm install
&npm test
alone will take more than the life time of the one time password.It would be helpful if right before the
npm publish
, user would be prompted to enter their otp in the cli.If you are interested, i can provided a PR.
The text was updated successfully, but these errors were encountered: