From 0276d4fbdfe9eeea679f47bbe67e83870647f697 Mon Sep 17 00:00:00 2001 From: laixintao Date: Tue, 13 Oct 2020 16:15:13 +0800 Subject: doc: update the documentation for connection via SSL. --- README.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.rst b/README.rst index f3c80e9e..d5934274 100644 --- a/README.rst +++ b/README.rst @@ -91,6 +91,16 @@ For more details: ``pgcli`` also supports many of the same `environment variables`_ as ``psql`` for login options (e.g. ``PGHOST``, ``PGPORT``, ``PGUSER``, ``PGPASSWORD``, ``PGDATABASE``). +The SSL-related environment variables are also supported, so if you need to connect a postgres database via ssl connection, you can set set environment like this: + +:: + + export PGSSLMODE="verify-full" + export PGSSLCERT="/your-path-to-certs/client.crt" + export PGSSLKEY="/your-path-to-keys/client.key" + export PGSSLROOTCERT="/your-path-to-ca/ca.crt" + pgcli -h localhost -p 5432 -U username postgres + .. _environment variables: https://www.postgresql.org/docs/current/libpq-envars.html Features -- cgit v1.2.3