Skip to content

Latest gh version saves credentials in plain text #12418

Closed as duplicate
Closed as duplicate

Description

@AndreaPi

Describe the issue

I installed the latest gh version in WSL 2. I login to my account with a token, but I get the dreaded message

! Authentication credentials saved in plain text

I thought this had been solved with the latest version of gh....

Affected version

gh version 2.83.2 (2025-12-10)
https://github.com/cli/cli/releases/tag/v2.83.2

Steps to reproduce the behavior

  1. gh auth login
  2. ? Where do you use GitHub? GitHub.com
  3. ? What is your preferred protocol for Git operations on this host? HTTPS
  4. ? How would you like to authenticate GitHub CLI? Paste an authentication token
  5. ? Paste your authentication token: ****************************************
  6. - gh config set -h github.com git_protocol https
    ✓ Configured git protocol
    ! Authentication credentials saved in plain text
    ✓ Logged in as AndreaPi
    

Expected vs actual behavior

I would like gh not to default to insecure behavior. I installed it "the right way" https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian so I thought it wouldn't store the token in plain text. Is there a way to achieve that, or is it just impossible when using HTTPS? Should I fall back to using SSH?

Activity

  1. added
    needs-triage
    on Jan 4, 2026
  2. williammartin commented on Jan 5, 2026

    @williammartin
    Member

    This happens when we couldn't access your keyring. Lots more info here on plans to remove the fallback: #10108

    It would also help a lot if we let people know why the keyring couldn't be accessed rather than just swallowing the error, so I'm going to leave this open with A/C.

    Acceptance Criteria

    Given gh cannot use the keychain
    When I log in
    Then the plain fallback message should be paired with an explanation for why we couldn't use the keychain

  3. added
    enhancement
    gh-auth
    and removed
    needs-triage
    on Jan 5, 2026
  4. github-actions commented on Jan 5, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as a feature 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.

  5. babakks commented on Jan 5, 2026

    @babakks
    Member

    Also, related to #8954, especially #8954 (comment).

  6. babakks commented on Jan 7, 2026

    @babakks
    Member

    I'm closing this as a duplicate of #8954.

    Also made #12442 to improve experience (captured @williammartin's A/C)

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-auth

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions