The connection failed. Kerberos challenged. Pgcli waited.
If you need Kerberos authentication with Pgcli, you cannot afford guesswork. Pgcli is a command-line client for PostgreSQL with auto-completion and syntax highlighting. It makes database work faster. But when your PostgreSQL server requires Kerberos (GSSAPI) auth, the setup changes.
First, ensure your environment has Kerberos configured and kinit works with your principal. Test this before touching Pgcli. Kerberos integration starts with the OS: valid ticket, up-to-date system clock, correct realm.
Pgcli relies on libpq under the hood. That means if psql can connect with Kerberos, Pgcli can too. No special Kerberos flags exist in Pgcli itself. Instead, you pass the connection string:
pgcli "postgresql://user@hostname/dbname?gssencmode=require"
Replace user, hostname, and dbname with your values. Keep credentials out of the string; Kerberos tickets handle auth silently once established. For servers enforcing encryption, set gssencmode=require to match policy.