Create a Codespace using the example .devcontainer.json (see below), try running psql.
Expected behavior: psql connects to the local Postgres
Actual behavior:
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: no pg_hba.conf entry for host "::1", user "postgres", database "postgres", SSL encryption
connection to server at "localhost" (::1), port 5432 failed: FATAL: no pg_hba.conf entry for host "::1", user "postgres", database "postgres", no encryption
At Github Codespaces,
psql
was failing.Steps to reproduce
.devcontainer.json
(see below), try runningpsql
.Expected behavior:
psql
connects to the local Postgres Actual behavior:.devcontainer.json
:After the fix
psql
connects successfully.