Sitelet https://github.com/basecamp/hey-cli/issues/522
Skip to content

Allow silencing the keyring-unavailable warning on headless machines #522

Description

@heredia21

Context

On a headless Linux server with no Secret Service or keyring, every hey invocation prints:

warning: system keyring unavailable, credentials stored in plaintext at ~/.config/hey-cli/credentials.json

It prints on every call, including --json and --quiet runs. Scripts that capture stdout and stderr together, or that treat any stderr output as a problem, have to filter it out each time, and the line gets into logs and error messages. In our case the real error in a failure report was hidden behind this warning.

The plaintext file fallback is fine for this kind of machine, which runs as a dedicated user with 0600 permissions. The problem is only that the warning can't be turned off.

No account-specific details below.

Ask

  • A way to choose the file store deliberately and silence the warning: hey config set credential_store file, or an env var such as HEY_CREDENTIAL_STORE=file.
  • With --json, put the warning in the JSON (for example a warnings array) instead of writing it to stderr, or print it at most once per machine.
  • Keep showing it by default for interactive first-time setups, where it's useful.

Related (closed): #352, #453 (keyring behaviour on Linux).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions