Error in production, "the user does not have a password"


I tried to commit my kirby project on the server (I also commit the users, by modifying the .gitignore), but when i try to login, the following line :

$kirby->auth()->login($email, $password);

Throw an exception with the message:

“the user does not have a password”

Do someone have an idea of how to resolve this problem ?

Ty for your help

Have you really committed the .htpasswd files for each user in the accounts folder?

Yep, I have

The error is thrown when no password is stored:

      if (empty($this->password()) === true) {
            throw new NotFoundException(['key' => 'user.password.undefined']);

Is the folder readable? Check your file/folder permissions, this is usually an issue if you deploy with git.

Sorry to ask that haha but how do I check this ? (I’m using gitlab)

Here is a good overview: Linux File Permissions and Ownership Explained with Examples

You need to check this on your server, not in GitLab.

Ok ok I will check that, ty a lot.