'WSL - Can't enter 2FA / One-time password when logging to NPM
I have set up WSL (Ubuntu 18.04) on my Windows machine. When trying to login to NPM, the console doesn't allow me to enter an one-time password (either it is 2FA digits or is just one-time password sent to E-mail if 2FA not configured) after entering the username and password, already showing me an 'bad otp' error. If I try to login to npm from native Windows cmd directly, the cmd works as expected allowing me to enter 2FA (or one-time password). Here are my logs:
jarro@HOME-PC:~$ npm login Username: jarro Password: Email: (this IS public) [email protected] npm WARN notice Please use the one-time password (OTP) from your authenticator application npm WARN adduser Incorrect username or password npm WARN adduser You can reset your account by visiting: npm WARN adduser npm WARN adduser https://npmjs.org/forgot npm WARN adduser npm ERR! Linux 5.10.16.3-microsoft-standard-WSL2 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "login" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code E401 npm ERR! failed to authenticate: Could not authenticate jarros: bad otp : -/user/org.couchdb.user:jarro npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /home/jarro/npm-debug.log
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
