summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaixintao <laixintaoo@gmail.com>2020-10-14 10:06:10 +0800
committerGitHub <noreply@github.com>2020-10-14 10:06:10 +0800
commitbbf5b2041576ebfcae120acacd27b99a7f0a9b72 (patch)
treef4cfc043f7ccf015b30edc972df3c782fcf186a9
parentf985e1bdd82fc3c54a8232487a1b410159acc12b (diff)
doc: update the documentation for connection via SSL. (#1215)
-rw-r--r--README.rst10
1 files changed, 10 insertions, 0 deletions
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