Django 收到 "FATAL: password authentication failed for user" 即使用户信任是正确的

Django receives "FATAL: password authentication failed for user" even though user crendntical are correct

一些背景: 我正在尝试在 Windows 上安装 arches project。在遇到一些问题后,我看到建议在 Linux 上 运行 它,所以现在我 运行 在 Ubuntu 终端上 Windows。

至于错误: 第一步是运行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.

还有:

我真的不知道还能做什么。谢谢

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