-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS connection failed with message: invalid peer certificate contents / PostgresError: no pg_hba.conf entry for host #356
Comments
I added
|
I encountered the same initial issue with my project:
and same error after adding I'm using PostgreSQL 15. Maybe it is a compatibility issue? |
Any idea how to fix it? I get an error with
|
Coming to this issue from googling IT seems that In deno-deploy, I solved this by adding an environment variable with the certificate found in
and then to the client const options = {
database: "db",
hostname: "myhost",
password: Deno.env.get("POSTGRES_PASSWORD"),
port: 5432,
user: "deno",
tls: {
caCertificates: [
certificate,
],
enabled: false,
},
}
const pool = new Pool(options, 5, true); this should work! |
OP is using Heroku, which uses self-signed certificates by default. They do have a feature for CA-signed certificates in preview. https://devcenter.heroku.com/articles/heroku-postgres-enhanced-certificates |
I just deployed to a deno project to deno deploy and got this message when I tried to run the insert.
I'm using heroku and they require SSL, from this old stackoverflow sequalize post I'm assuming I need to either 1) send the request using SSL 2) the reject the unauthorized call in deno? I'm not sure how to do either.
Here's the full message:
Any advice on how to fix? Does
denodb
have auseSSL
option?The text was updated successfully, but these errors were encountered: