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
Registered user can't login #943
Comments
@bodz1lla please provide version |
@juanpicado yes, please.
Also, added to an issue. |
I am not able to replicate it. |
@ayusharma
|
I'm getting the same error with verdaccio version 3.7.1 in docker with a nginx proxy
I start with 10 max_users:
Now I change config to -1 max_users and restart the docker container
Response:
Long Version:
Server Log:
|
I can reproduce by setting max_users to 10, running "npm login" successfully, then setting max_users back to -1 and running "npm login" again, which fails due to the "error:maximum amount of users reached" even though I used identical credentials and e-mail. |
@michaelfig please provide your env info, version, etc. |
I'll try to get you exact steps to reproduce, but for now: Kubernetes Helm chart 0.5.0, verdaccio docker image 3.8.1 I first set up verdaccio with a custom config map and mounted a read-only /etc/verdaccio/htpasswd, and set max_users to -1. Then when that didn't work (npm adduser failed even though I verified that the password was correct... Maybe an issue with @verdaccio/file-locker not working on a read-only filesystem), I updated the config to use /verdaccio/storage/htpasswd. Then I got the above behavior. Everything works fine when running npm adduser and max_users is 10. Then I can set max_users to -1 and everything works except for npm adduser (even with identical credentials). Lmk if you need anything further. |
Thanks @michaelfig I'll dig into it. |
@bodz1lla or @cara please reopen this issue, because I'm still facing this problem, the same behaviour as guys above. Steps to reproduce:
version: 4.x-next |
Okey, so we have some misleading information, because config.yaml saying:
But documentation saying:
And by this behaviour I guess, documentation is right. Because when I change it to max_users: 1, Im able to login by user I've created. So yeah... |
Thanks for point it out, we are moving all documentation to a single place so in the future we avoid this kind of inconsistency. |
Now I can do exactly what I need... create htpasswd manually and deploy verdaccio via Helm. My steps are: Create a secret to contain the verdaccio.htpasswd identifying valid users.
I use the following stanzas in my Helm config file, verdaccio.yaml:
Then install verdaccio.
Please document this case in the sample configs, or maybe just link to this comment for the people installing via Helm? Thanks, |
I'm facing this issue too. However I managed to find out that npm client (mine is 5.6.0) won't send Here is what we have now from npm
And here is the curl command that ends up successfully
|
@korob93 I'll check this issue again. |
@ayusharma thank you for quick reply =) PS using verdaccio version 3.8.5 |
@korob93 why basic auth over tokens ? I am curious |
Hi, @juanpicado. Here is my flow So, the question here is how do I get token without My workaround for now is to create 2 users: one for basic auth, which cannot access or publish packages at all, and one for actually doing registry stuff. So my login process looks quite ridiculous =)
Then I pass login and can act as user2 If I miss something and there is a better way to deal with this situation I'd be happy to know the correct solution UPDATE |
I can't register with npm adduser or npm login but npm not send CONTENT-TYPE : application/json I have use postman to test and this request not work but this work |
Hey, is the issue solved? I cloned the latest verdaccio/ui master and trying to add a user. It is throwing the same error.
|
The ui part is only the frontend, not the backend / server. Please provide the exact steps that you have done. The |
Steps that I have followed.
The dev server is running and at the port 4872 Ran |
@JayaKrishnaNamburu @DanielRuf I think we should handle it either via Discord chat or UI repo, here we are creating noise in a not related issue. I'm sure it is an easy fix. |
The devserver uses the memory. The devserver backed runs on port 8080 by default. |
This is too old, if someone still has this issue, please:
💯 |
Deleted Sorry I was testing an old version, with v4 issues are fixed. |
Hi @kopax,
Please open a new issue and provide all / more relevant details. |
Hi, I'm using verdaccio as a windows service, following the guide https://verdaccio.org/docs/en/windows verdaccio -V |
Hi @lhf552004, Please open a new issue with all relevant details. |
Same issue here. This is so frustrating. Actually.. it's not that I can't login in. npm login works. The problem is scripting from a docker build. Since I don't have access to the docker build launcher, I am stuck with solutions such as npm-cli-login or curl. none of them worked so far. |
Hi @orefalo, please check my last comment and the other previous comments so we can help you. |
Log-in Bug
Hi Guys,
Maybe you can assist me regarding the following issue.
I tried to find the solution but found nothing.
Please review.
Verdaccio - 3.5.1.
When the existing user is trying to log in via npm, it gets an error "username is already registered".
If I disable registration with option "max_users: -1" in config.yaml, then I get an error "maximum amount of users reached".
Terminal output
Expected behavior
Log-in to Verdaccio server with a registered user.
Configuration File
Debugging output
Temporary solution
Only possible to log-in with the registered user is allowed in config.yaml access and publish to all, anonymous.
But it's not secure.
The text was updated successfully, but these errors were encountered: