Hello, I am working with a group of team and I am trying to connect my django project to our postgresql database. However, when I try to make migrations, it gives me password authentication failure.
In the settings.py:
DATABASES = {
‘default’: {
“ENGINE”: “django.db.backends.postgresql”,
“NAME”: getenv(“DB_NAME”),
“USER”: getenv(“DB_USER”),
“PASSWORD”: getenv(“DB_PASSWORD”),
“HOST”: getenv(“DB_HOST”),
“PORT”: getenv(“DB_PORT”),
},
}
In the .env file:
DB_NAME = ‘postgres’
DB_USER = ‘’
DB_PASSWORD = ‘’
DB_HOST = ‘’
DB_PORT = ‘5432’
The input in the .env file is correct because one of my collegue has successfully logged in with this input.
When I tried to ‘python manage.py migrate’, it returns an error
'django.db.utils.OperationalError: connection failed: FATAL: password authentication failed for user “postgres” ’
I am able to connect to the database using pgadmin4.
Any help will be appreciated, and if more information is required, I will provide it as soon as possible.