Open jakef opened 9 years ago
Not sure if this is a bug or an enhancement. At the moment I think it's more an enhancement as the http server probably doesn't understand the username/password part (which shouldn't get to the nopar side of things in the first place).
Can you post your nginx config so I can try to reproduce it?
I've managed to get this working recently with an up-to-date version of the npm client.
Rough steps are:
/-/user
npm login --registry <url>
~/.npmrc
to set always-auth=true
The general idea is to let the npm client store the credentials separately to the registry URL, and tell it to pass them along on every request. The /-/user
stuff is effectively the "login" endpoint for npm, so needs to be accessible without auth.
Oh hello.
auth_basic "Restricted";
auth_basic_user_file mysite_http_basic;
upstream nopar_server {
server localhost:5984;
}
server {
listen 80;
server_name nopar.mysite.org;
error_log /var/log/nginx/error.log;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://nopar_server;
}
}
Howdy,
I have nopar running behind nginx with user basic auth. I tried adding auth to my app with,
npm config set registry http://user:password@nopar.mywebsite.org
. When I runnpm install
in my app, I receive:When I look back at my nopar dashboard, some packages were install. In my app however, node_modules fails to generate. Ideas?