Failed to reset user password: error: password authentication failed for user "postgres"
EvgeniaPatsoni opened this issue · 1 comments
EvgeniaPatsoni commented
Hello.
I try to create a user following the instructions here: https://github.com/magda-io/magda/blob/main/docs/docs/how-to-create-local-users.md
However, after I port forward the Magda database to local and then try to create a new user like this:
yarn set-user-password -u test@email.com -p "test" -a
I receive the following error:
yarn run v1.22.19
$ ./utils/set-user-password.js -u test@email.com -p test -a
Failed to reset user password: error: password authentication failed for user "postgres"
error Command failed with exit code 1.
Can you please point me to the right direction?
What could possibly be the mistake?
Thank you in advance
EvgeniaPatsoni commented
Turns out I needed to create a local ENV var named POSTGRES_PASSWORD with the value of the randomly generated postgresql-password.