即使用户凭据正确,Django也会收到“致命错误:用户密码验证失败”

问题描述 投票:0回答:1

某些背景:我正在尝试在Windows上安装arches project。遇到一些问题后,我发现建议在Linux上运行它,因此现在我在Windows的Ubuntu终端上运行。至于错误:第一步是运行python manage.py setup_db命令。失败并显示:

FATAL:  password authentication failed for user "kali"

Error connecting to db with these settings: dbname=jerarch user=kali host=localhost port=5432

Have you created the database yet? The quickest way to do so is to supply Postgres superuser credentials in the PG_SUPERUSER and PG_SUPERUSER_PW settings, and then re-run this same command.

也:

  • 用户“ kali”存在,并且我已使用ALTER USER kali WITH PASSWORD 'xxxxxxxx';设置了它的密码
  • [psql -U kali -d jerarch可以正常工作,并且只能使用我之前设置的密码(意味着ALTER USER有效)。
  • PG_SUPERUSERPG_SUPERUSER_PW根据需要定义。

我真的不知道该怎么办。谢谢

django postgresql python-3.6
1个回答
0
投票

所以在发布问题之前,我发现问题是重复的postgresql环境:一个正在Windows上运行,另一个正在虚拟Ubuntu上运行。在psql中使用Ubuntu cli解决了Ubuntu postgres,而出于某些原因,在Ubuntu上djnago解决了Window的postgres。 kali用户也在那里被手动配置,但是使用了另一个密码。

© www.soinside.com 2019 - 2024. All rights reserved.