I'm trying to use the first answer here to transfer a local postgre db to elephantSQL
https://stackoverflow.com/questions/1237725/copying-postgresql-database-to-another-server
The command given is: pg_dump -C -h localhost -U localuser dbname | psql -h remotehost -U remoteuser dbname
I have no chance to enter a password in the following:
owner@G700:~$ pg_dump -C -h localhost -U rep1 repdb1 | psql -h baasu.db.elephantsql.com -U bgpacbpe bgpacbpe
Password:
Password for user bgpacbpe: pg_dump: [archiver (db)] connection to database "repdb1" failed: fe_sendauth: no password supplied
How can I resolve this?
If there is a less error prone way to do this I would also like to try that.
owner@G700:~$ psql --version
psql (PostgreSQL) 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)