Skip to content

gh auth status should indicate when a token is stored in plain text #13872

Open

Description

@adamsjack711-ux

Describe the feature or problem you'd like to solve

When a token is stored in the plaintext hosts.yml fallback — because the system keyring is unavailable, or the user passed --insecure-storage — gh auth status gives no indication that the token is stored in plain text, nor how to move it into the keyring. The only signal is a one-time yellow warning at login time, which is easy to miss. A user who fell into the plaintext fallback has no ongoing way to notice or remediate it.

Proposed solution

In gh auth status, when a host's active token source is oauth_token (plaintext config) rather than keyring, show a warning plus a remediation hint, mirroring the existing missing-scopes warning idiom:

  ! Token stored in plain text
  - To store your token in the system keyring, run: gh auth login -h <host>

This is display-only — no change to storage behavior, flags, or the --json output schema.

Additional context

Happy to open a PR — I already have a small, tested change prepared (adds the warning in pkg/cmd/auth/status/status.go, keyed off the existing oauth_token source check in buildEntry, with tests).

Activity

  1. cli-triage commented on Jul 14, 2026

    @cli-triage

    This is a clear enhancement request: adding a persistent, visible warning to gh auth status when a token is stored in plaintext (oauth_token in hosts.yml) rather than in the system keyring. No exact duplicate was found — related issues #10108 (improving the login fallback flow) and #13330 (keychain token visibility) address adjacent concerns but not this specific gap. The request is well-scoped and display-only, so I'm suggesting the enhancement label.

    Generated by Issue Triage (skills-driven) for #13872 · 21.5 AIC · ⌖ 3.95 AIC · ⊞ 5.1K · ◷

  2. added
    enhancement
    gh-auth
    and removed
    needs-triage
    on Jul 20, 2026
  3. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Contributions welcome label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

  4. SukkaW commented on Sep 2, 2026

    @SukkaW

    Unstale. Nice to have.

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

    enhancementgh-authstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions