class Gem::CredentialStore

Gem::CredentialStore is opt-in storage for authentication secrets (API keys, host credentials) in the operating system’s native secret store instead of a plain text file:

A third party can add another backend (1Password, pass, HashiCorp Vault, …) by shipping a gem that provides rubygems/credential_store/backends/<name> and calls .register_backend from it. Users then select it by name instead of true (see .resolve_backend).

Every public method traps all errors and returns nil/false instead of raising, so that callers can transparently fall back to their existing file-based storage when the native store is unavailable or fails (a locked keychain over SSH, a headless Linux session without a keyring daemon, …).