heroku / cli

Heroku CLI
https://devcenter.heroku.com/articles/heroku-cli
ISC License
852 stars 223 forks source link

heroku pg:psql does not work with asdf #1735

Open sobrinho opened 3 years ago

sobrinho commented 3 years ago

Cross report from https://github.com/smashedtoatoms/asdf-postgres/issues/41

Describe the bug

$ psql --version
psql (PostgreSQL) 13.1

$ type psql
psql is /Users/sobrinho/.asdf/shims/psql

$ heroku pg:psql --remote production
--> Connecting to [redacted]
psql: error: FATAL:  no pg_hba.conf entry for host "[redacted]", user "[redacted]", database "[redacted]", SSL off
 ▸    psql exited with code 2

I didn't investigate though if this is an issue with Heroku CLI but I do have another machine using Homebrew Postgres and it works just fine, exactly the same version of the Heroku CLI/Node.JS.

Steps to reproduce

asdf install postgres 12.5 # or 13.1
heroku pg:psql --app [some app with postgres on Heroku]

Expected behavior

A psql session

Screenshots

N/A

Additional context

The machine failing is M1 and the one working is Intel, not sure if anything changes because of that.

sobrinho commented 3 years ago

ASDF does not include OpenSSL in Postgres by default.

Maybe we could verify and provide a better error message like "Your local postgres does not have openssl, please compile with --with-openssl" or something like that.