I have a Heroku app and it has a Heroku postgres addon attached. Im trying to connect to the remote heroku database from the Gitpod (online IDE) command line.
heroku pg:psql -a my-heroku-app
But its giving the following error:
--> Connecting to postgresql-rigid-XXXXX
psql: error: could not connect to server: FATAL: role "xxxxxxxxxxxxxxx" does not exist
And I get the same error when I try to connect with the connection URL
psql postgres://xxxxxxxxxxxxxxx:[email protected]:5432/ddddddddddddd
I have properly installed postgres and heroku-cli in Gitpod and they work fine.
Appreciate your help.
Thanks!
Ok I found the answer thanks to this and this.
heroku pg:psql
does'nt seem to work in Gitpod. So I followed this to import a db dump file into heroku postgres. From Gitpot command line I didand got the db dump file from my local (Gitpod) database. Uploaded it to my google drive and got the publicly downloadable link. Then did
Now I have all the data in my heroku postgres database.
Cheers!