Skip to content

doctor: outside a git repository, "gh — found but NOT authenticated" is still the aggregate answer (the #102 fix needs a repo) #183

Closed

Description

@eharriett0

What happens

On a machine with two gh hosts configured, github.com (logged in) and a second GitHub Enterprise host that is unreachable (gh auth status prints X Timeout trying to log in for it), wt doctor run outside any git repository says:

✗ repo — not inside a git repository
⚠ gh — found but NOT authenticated (claim/release/merge-pr need `gh auth login`)

Run from inside a repository whose remote is on github.com, on the same machine a few seconds later, the same check passes:

✓ repo — <path>
✓ gh — authenticated

gh auth status exits 1 here only because of the unreachable second host. The github.com account is logged in.

Why it looks like the #102 path

#102 stopped using the aggregate gh auth status exit code and checks the repository's forge host instead. Outside a repository there is no forge host, so the check appears to fall back to the aggregate answer, and the #100 false positive comes back.

Expected

Outside a repository, either report per host (for example: authenticated on github.com, 1 other host unreachable), or say that the gh check needs a repository to choose a host. Either is better than NOT authenticated for an account that is logged in.

Version: wt vHEAD-c0f3c3e.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions