Skip to content

New keyring auth slowing down gh #7145

Closed

Description

@benjlevesque

Describe the bug

Since v2.24.3, any API action takes a very long time to run (WSL2, Ubuntu 20.04).

Steps to reproduce the behavior

gh pr list

Details

I could pin down the issue to the keyring, that seems to take very long to run on my machine. I think this is for me to solve, and not related to gh (any lead would be appreciated though!).

There is however, an issue with gh:
By default, it will not use the keyring, but as it's trying with a non existing host (example.com), it will not find a token and fallback to the keyring.

Workaround

A dumb workaround to fix this is to append the following to ~/.config/gh/hosts.yml:

example.com:
  oauth_token: abcd

Activity

  1. added
    bug
    on Mar 13, 2023
  2. added
    needs-triage
    on Mar 13, 2023
  3. changed the title [-]New keyring auth causing [/-] [+]New keyring auth slowing down `gh`[/+] on Mar 13, 2023
  4. benjlevesque commented on Mar 13, 2023

    @benjlevesque
    ContributorAuthor

    This resolved my keyring config: https://x410.dev/cookbook/wsl/sharing-dbus-among-wsl2-consoles/

    still, wouldn't be better to not always rely on keyring, especially since it's used to check a dummy host?

  5. samcoe commented on Mar 14, 2023

    @samcoe
    Contributor

    @benjlevesque Thanks for reporting this. We should definitely be skipping the keyring when checking the dummy host as you suggested.

  6. added
    priority-2
    and removed
    needs-triage
    on Mar 14, 2023
  7. benjlevesque commented on Mar 14, 2023

    @benjlevesque
    ContributorAuthor

    Thank you @samcoe. I've submitted a PR to fix it, but I'm not 100% sure about the Enterprise scenario.

  8. self-assigned this
    on Mar 14, 2023
  9. mislav commented on Mar 15, 2023

    @mislav
    Contributor

    @benjlevesque Great find; thank you!

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

Metadata

Metadata

Assignees

Labels

bugpriority-2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions