Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Password change for npm user

Tags:

npm

On one system I used npm adduser and then npm publish to create a package. I want to release another version of this package, but I'm on a different system now. When I try npm publish it tells me that my name or password is incorrect, which is not shocking.

However, I can't figure out how to get it to where I can type my password in again. When I try either npm adduser or npm login, it only prompts for my Username and Email. It doesn't prompt for my password, and also tells me that my Name or password is incorrect. It suggests that I reset the password at https://npmjs.org/forgot, but I don't need to do this -- I know the new password, I just need to be prompted for it.

I've also tried removing the username from npm config via delete username, but it still shows up when I do npm config get.

There also doesn't seem to be any kind of npm logout or another way to end my auth session with npm.

What can I do to log in to npm again with my new password?

like image 930
Explosion Pills Avatar asked Apr 30 '14 15:04

Explosion Pills


People also ask

How do I find my npm username?

Description. Display the npm username of the currently logged-in user. If logged into a registry that provides token-based authentication, then connect to the /-/whoami registry endpoint to find the username associated with the token, and print to standard output.


1 Answers

just remove ~/.npmrc where old npm configuration is saved and retry command $ npm adduser.

see npm adduser

like image 132
shawnzhu Avatar answered Oct 17 '22 22:10

shawnzhu