-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot login - this user already exists #329
Comments
It was something to do with node-crypt3 not building for some reason. I reinstalled sinopia, node-crypt3 still does not build, but sinopia seems to install without it. Now the uncaught exception is gone, but I still cannot login with an existing user:
Well of course it exists, that's why I want to login with it... I used Which is the same as And according to the docs, adduser is the way to authenticate, too:
So how can I login with an existing user? |
I have fixed this issue by adding an extra authenticate call before add_user in the PUT request handler. This way if the user can authenticate itself with the current plugin, then it will be instantly logged in instead of sending back a HTTP 409. Of course when the password is invalid, the add_user will be called and it will failed because the user already exists. But currently using the auth plugin authenticate interface there is no way to tell if the user exists or the password did not match, so we can just return the user already exists message when the password is wrong. Please review my changes. |
This is a real blocker for anyone who is using sinopia for their private packages. Any chance this could be prioritised? Thanks. |
bump on this... |
epp... it was the wrong password for me... embarrassed |
I also get the error of "this user already exists : -/user/org.couchdb.user:xxxxxxxx/-rev/undefined" when doing npm adduser --registry... |
same problem here; very annoying |
I can confirm @henkosch patch fixes the issue |
👍 |
We found that deleting the appropriate user entry from the htpasswd file allowed the user to |
So whats the status on this? I'd like to login with my existing user, and found that login and user creation is the same thing. When I do ... I get this beautiful answer:
Why is this a PUT and not a POST anyways and why is login and user creation the same thing? |
You can get this working by doing an authenticated request: Creating a user Login existing user This is actually also what NPM does, see https://github.com/npm/npm-registry-client/blob/856eefea40a2a88618835978e281300e3406924b/lib/adduser.js#L62-L90 |
Any way around this? It's still broken on the latest version of sinopia. I add the users to htpasswd and they cannot login. (Allowing them to register is not an option: anyone could register, which is not what I want). Update: I found a workaround: adding the users in the config file, and generating their passwords using require('crypto').createHash('sha1').update(pass).digest('hex'). It looks like it should also be possible to add the passwords to the htpasswd file, but I found two different in various documentations (including sinopia-htpasswd) (using the htpasswd tool from apache-tools, or mkpasswd from whois), but neither work generate a password that sinopia recognizes. |
Also confirmed broken here. Quite inconvenient. |
The format of
So that's why previously-generated files don't work. If you wish to use
Now you can re-launch Also, this |
Sinopia crashes when I try to login.
This is the output:
Node and npm versions used:
server: Ubuntu 14.04
server npm: 2.14.7
server node: 4.2.1
client npm: 2.14.7
client node: 4.2.1
Update:
I have solved the uncaught exception problem, but I still cannot login. See below.
The text was updated successfully, but these errors were encountered: