Skip to content

secure keyring storage doesn't work with KeepassXC #8691

@m00nwtchr

Description

@m00nwtchr

Describe the bug

Logging in with gh auth login seems successful, but it appears that the cli cannot retrieve the token from KeepassXC.
It does seem to be saved correctly in KeepassXC.

gh version 2.43.1 (2024-01-31)

Steps to reproduce the behavior

  1. Setup the KeepassXC Secret Service feature. (e.g. https://avaldes.co/2020/01/28/secret-service-keepassxc.html)
  2. Ensure that no other secret service is running
  3. Log in with gh auth login
  4. Use any command which requires authentication.
  5. See auth error.

Logs

❯ gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations on this host? SSH
? Generate a new SSH key to add to your GitHub account? No
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: F8A4-A179
Press Enter to open github.com in your browser...
✓ Authentication complete.
- gh config set -h github.com git_protocol ssh
✓ Configured git protocol
✓ Logged in as m00nwtchr
! You were already logged in to this account
❯ gh repo list
HTTP 401: This endpoint requires you to be authenticated. (https://api.github.com/graphql)
Try authenticating with:  gh auth login
❯ keyring get gh:github.com m00nwtchr
<oauth token>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-authrelating to the gh auth commandneeds-triageneeds to be reviewed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions