You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sinopia does not behave like I expect, when the maximum amount of users is reached, and I want to execute npm adduser on a new machine with an existing user.
Steps to reproduce:
Start sinopia with default config
On client add a user "test" using: npm adduser --registry http://localhost:4873/ --always-auth
Stop sinopia
Edit config, set max_users: -1
Start sinopia
On client add a user "test" using: npm adduser --registry http://localhost:4873/ --always-auth
Client:
npm WARN adduser Incorrect username or password
npm WARN adduser You can reset your account by visiting:
npm WARN adduser
npm WARN adduser https://npmjs.org/forgot
npm WARN adduser
npm ERR! Error: maximum amount of users reached : -/user/org.couchdb.user:tobiash
npm ERR! at RegClient. (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
npm ERR! at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request. (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage. (/usr/lib/node_modules/npm/node_modules/request/request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
npm ERR! at process._tickCallback (node.js:442:13)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Linux 3.2.41-042stab094.8
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "adduser" "--registry" "http://localhost:4873/" "--always-auth"
npm ERR! cwd /tmp/npmtest
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npmtest/npm-debug.log
npm ERR! not ok code 0
Server:
http <-- 403, user: undefined, req: 'PUT /-/user/org.couchdb.user:test', error: maximum amount of users reached
The text was updated successfully, but these errors were encountered:
Same problem here ... unable to log in after installing sinopia from scratch, setting max_users to -1, adding a new user to htaccess on the server, and restarting the server.
After reading the documentation I thought that setting max_users to -1 was to prevent people from creating new accounts. Apparently it prevents logins too. Is this really how it's meant to work?
Description:
Sinopia does not behave like I expect, when the maximum amount of users is reached, and I want to execute npm adduser on a new machine with an existing user.
Steps to reproduce:
Start sinopia with default config
On client add a user "test" using: npm adduser --registry http://localhost:4873/ --always-auth
Stop sinopia
Edit config, set max_users: -1
Start sinopia
On client add a user "test" using: npm adduser --registry http://localhost:4873/ --always-auth
Expected:
Client: npm finishes without error
Server:
http <-- 409, user: undefined, req: 'PUT /-/user/org.couchdb.user:test', error: bad username/password, access denied
http <-- 200, user: undefined, req: 'GET /-/user/org.couchdb.user:test?write=true', bytes: 0/53
http <-- 201, user: test2, req: 'PUT /-/user/org.couchdb.user:test/-rev/undefined', bytes: 208/86
Actual:
Client:
npm WARN adduser Incorrect username or password
npm WARN adduser You can reset your account by visiting:
npm WARN adduser
npm WARN adduser https://npmjs.org/forgot
npm WARN adduser
npm ERR! Error: maximum amount of users reached : -/user/org.couchdb.user:tobiash
npm ERR! at RegClient. (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
npm ERR! at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request. (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage. (/usr/lib/node_modules/npm/node_modules/request/request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
npm ERR! at process._tickCallback (node.js:442:13)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Linux 3.2.41-042stab094.8
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "adduser" "--registry" "http://localhost:4873/" "--always-auth"
npm ERR! cwd /tmp/npmtest
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npmtest/npm-debug.log
npm ERR! not ok code 0
Server:
http <-- 403, user: undefined, req: 'PUT /-/user/org.couchdb.user:test', error: maximum amount of users reached
The text was updated successfully, but these errors were encountered: