Unable to install packages if access is limited to authenticated #2152
-
Describe the bug I have attempted to rename my Verdaccio configuration files and tried this with a clean install. I just edited the config file to require authentication for package access and added one user to the htpasswd file. This made no difference, npm still throws a E401 error every time. I run Verdaccio in a virtual Ubuntu 18.04 server behind a Nginx reverse proxy. The Nginx config is
Verdaccio is started using Systemd, the unit file is:
To Reproduce
Expected behavior Actual behaviour
The contents of the mentioned logfile are:
Configuration File (cat ~/.config/verdaccio/config.yaml) After editing the default config, it is
The htpasswd file is just one line generated using https://hostingcanada.org/htpasswd-generator/. Environment information
(Verdaccio does not run in Docker even though Docker is installed.) Debugging output
I hope this debug file log is sufficient, I can find more if needed:
Just the request log of Verdaccio from Systemd logs is:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I see |
Beta Was this translation helpful? Give feedback.
-
Yeah, that seems to have fixed it. I guess npm by default doesn't authenticate GET requests, didn't know that. Thank you for the help! |
Beta Was this translation helpful? Give feedback.
I see
user=null
in your log, seems you are missingalways-auth = true
in your.npmrc
file.