Documentation
¶
Overview ¶
Command ghget is the fleet's read-only GitHub REST client: it replaces `gh api` for GET requests, with the right token.
`gh` uses its own login, which lacks scopes the fleet's token file has (admin:org): `gh api orgs/<org>/actions/permissions/fork-pr-contributor-approval` answered 403 in four organisations while ~/.github-token could read it.
It can only send GET: the method is a constant in one place, there is no flag that sets a method or a body, and the path is refused if it is not a relative API path. The token comes from a 0600 file (default ~/.github-token), goes only in the Authorization header, and is redacted from anything printed. https only (http for 127.0.0.1 test servers); redirects are refused, so the token never follows a Location elsewhere.
Exit status separates an answer from the absence of one:
0 answer read (JSON on stdout) 3 404: the thing is absent 4 401/403: UNREAD, not empty; the missing scope is printed 5 rate limited; the reset time is printed 2 usage or any other failure
References (read 2026-11-28):
https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api (Link header, rel="next") https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api (x-ratelimit-remaining/reset, retry-after, 403/429) https://docs.github.com/rest/actions/permissions#get-fork-pr-contributor-approval-permissions-for-an-organization