Closed CarlLim94 closed 1 year ago
The command should be npm whoami --registry http://localhost:4873
, not npm whoami
I had set the registry in .nvmrc already Will try again with that configuration
Hi,
running npm whoami --registry {domain}
does get my github username.
after that I tried to re-login from the verdaccio UI, then run these commands:
npm config set //npm.devops.uenrol.me/:_authToken "{jwt token}"
npm publish --registry {domain}
I'm still getting the error 401 as mentioned above
Did you set always-auth? Please see the commands in the UI. Please make sure you performed all the right steps.
Hi,
After you mentioning about the npm whoami
require to add in the registry flag
I had found out that when I run config set
command it set the value in .npmrc
which is located in my home directory
but when I run npm publish
in my project directory, it seems to looking for .npmrc
in the project folder therefore it is not authenticating correctly.
Thanks a lot for your assists, currently already able to publish with the correct credential.
Great, glad you got it working ✨😀
Bug Report
Versions
Environment
Observed behavior
When running
npm whoami
ornpm publish
, getting error 401 although the JWT token is still validExpected behavior
Expecting project will be compressed and upload into s3
Steps to reproduce
I'm setting up verdaccio by follow this guide
On web, successful to login and able to see the package I published previously (permission was set the
$all
previously, published as anonymous, now updated to$authenticated
)clicked on the configuration, set the registry and access token in gitbash
then run
npm whoami
I did came across the the troubleshooting section, added the security in the config but still behave the same
Additional context
~/.config/verdaccio/config.yaml