Skip to content

Login doesn't work if user registration is disabled #77

@Oneiros90

Description

@Oneiros90

I'm using verdaccio as NPM server, with user registration disabled.
I configured verdaccio's htpasswd file as my "whitelist" file.

Then if I try to login to verdaccio using this command:
npm-cli-login -u username -p password -e [email protected] -r http://localhost:4873

verdaccio's response is

http --- 127.0.0.1 requested 'PUT /-/user/org.couchdb.user:test.username/-rev/undefined'
error--- authenticating for user test.username failed. Error: bad username/password, access denied
http --- 200, user: null(127.0.0.1), req: 'PUT /-/user/org.couchdb.user:test.username/-rev/undefined', bytes: 226/0
error--- the user test.username could not being added. Error: user registration disabled

In other words, it looks like npm-cli-login tries to register a new user, but I just want to authenticate!
Using npm login --registry http://localhost:4873 it works without problems. But I can't use that, since it needs cli interaction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions