1
0
Fork 0

doc: update the documentation for connection via SSL. (#1215)

This commit is contained in:
laixintao 2020-10-14 10:06:10 +08:00 committed by GitHub
parent f985e1bdd8
commit bbf5b20415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -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