You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicating the right SSL certificate using the ?sslrootcert=... option should work, but it's kind of finicky to get it to work. I had success on Node 12 doing this, but on Node 14 not so much.
Since we're using a connection string, we can't just add rejectUnauthorized: false (though you could try it with ?rejectUnauthorized=0 or similar, I suppose).
I recently raised this PR against pg-connection-string to allow for parsing ?sslmode=no-verify, but I'm not sure if it's released yet: brianc/node-postgres#2345
Another option is to disable Node's TLS validation; e.g.:
Ultimately this is an issue between the pg module, your Node version, your server's trusted SSL certificates, and your database server. gatsby-source-pg has very little say in the matter.
Summary
I'd like to connect to a Postgres instance running in Heroku.
Additional context
I use Heroku's DATABASE_URL environment variable, with the suffix
?ssl=1
in myconnectionString
. When I rungatsby develop
I get this error:The text was updated successfully, but these errors were encountered: