Closed
Description
I'm trying to use the SQL connection with a Heroku database. Heroku requires SSL for postgres connections but provides a self-signed cert.
With a connection string of the form: postgres://user:password@host:post/database
Fetching: SQL
Error: Unable to connect to database: no pg_hba.conf entry for host "xx.xxx.xx.xxx", user "Read-only", database "xxxxxxxxxxx", SSL off
Error: Workflow failed! no pg_hba.conf entry for host "xx.xxx.xx.xxx", user "Read-only", database "xxxxxxxxxx", SSL off
With a connection string of the form postgres://user:password@host:post/database?sslmode=require
Fetching: SQL
Error: Unable to connect to database: self signed certificate
Error: Workflow failed! self signed certificate
I think the solution is to add an option to ignore invalid certificates. Here
Lines 68 to 71 in e83e6ea
I think this needs to pass an ssl object like…
connection = await createConnection({
type: protocol,
url: config.sql_connstring,
ssl: {
rejectUnauthorized: config.require_valid_cert
}
})
Something like that. I'm not a typescript developer but I hope that helps