diff options
author | laixintao <laixintaoo@gmail.com> | 2020-10-13 16:15:13 +0800 |
---|---|---|
committer | laixintao <laixintaoo@gmail.com> | 2020-10-13 16:21:48 +0800 |
commit | 0276d4fbdfe9eeea679f47bbe67e83870647f697 (patch) | |
tree | df9554491a3a96797a191eb974333a457cc0ef44 | |
parent | 7626d9a5f27a221d87f31dcb5bb8fc12024f6c58 (diff) |
doc: update the documentation for connection via SSL.doc/environment
-rw-r--r-- | README.rst | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |