user13469785
user13469785

Reputation:

pg_dump : error: connexion to database « dbdev » failed : fe_sendauth: no password supplied

I am trying to use pg_dump command in a container without entering the password.

I firstly checked pg_dump with password entered in promp, when I do

pg_dump -Fp --host my_hostname --port 32045 --dbname dbdev --username pgsqladmin test.sql 

it ask me the password. I enter it and it works.

When I try:

pg_dump -Fp --host my_hostnae --port 32045 --dbname dbdev --username pgsqladmin -w test.sql

I have the error:

pg_dump: error: connexion to database « dbdev » failed : fe_sendauth: no password supplied

I am working with PGAAS. What modifications can I do in order to avoid this error?

I use .pgpass file and I set ENV PGPASSFILE=/opt/nifi/.pgpass

.pgpass file has chmod 0600 And it looks like : hostname:port:database:username:password

Upvotes: 0

Views: 3339

Answers (1)

Troy Meyerink
Troy Meyerink

Reputation: 1

I believe this was answered here?

How to pass in password to pg_dump?

Make sure your file is .pgpass and not .pgpas and that it is chmod to 600

Upvotes: 0

Related Questions