asyncpg error: "no pg_hba.conf entry for host" in Heroku asyncpg error: "no pg_hba.conf entry for host" in Heroku heroku heroku

asyncpg error: "no pg_hba.conf entry for host" in Heroku


Using the solution from this worked.

import sslssl_object = ssl.create_default_context()ssl_object.check_hostname = Falsessl_object.verify_mode = ssl.CERT_NONE# connect elsewherepool = await asyncpg.create_pool(uri, ssl=ssl_object)

Note: You don't need to use any certificate like mentioned in the comment, as we set verify_mode to not use certificates.