Genesys Cloud CLI gc command — authentication fails on Ubuntu 22.04

The GC CLI authentication failure on Ubuntu 22.04 is almost certainly a keyring dependency issue.

The gc CLI tries to store OAuth tokens in the system keyring. On Ubuntu 22.04 minimal server installs, the gnome-keyring or libsecret packages aren’t installed. The CLI silently fails to cache the token and prompts you to re-authenticate on every command. Install gnome-keyring or use the --no-keyring flag and store the profile in a dotfile instead.

# Fix for Ubuntu 22.04 headless servers
export GC_PROFILE=/opt/gc-cli/.gc-profile
gc profiles new \
  --name prod \
  --clientId $CLIENT_ID \
  --clientSecret $CLIENT_SECRET \
  --environment mypurecloud.com

# Verify
gc users list --autopaginate | head -5

Don’t waste time debugging keyring. Use env vars and CI/CD pipelines.