Authentication Commands
ghqc includes a small auth command group for host-aware credential management and troubleshooting.
These commands are useful when you want to:
- log in for the current repository host or a specific GitHub host
- inspect the local
ghqcauth store - see which auth source wins for the selected host
- print the token
ghqcwould actually use
Commands
Section titled “Commands”ghqc auth login- Log in for a host and optionally store the token inghqc.ghqc auth logout- Remove the storedghqctoken for a host.ghqc auth status- Show the local auth store and available auth sources.ghqc auth token- Print the resolved token for the selected host.
Host Resolution
Section titled “Host Resolution”All auth commands resolve the host in the same order:
--host- current repository remote
If ghqc cannot determine a host from the current directory, re-run the command with --host.
Source Priority
Section titled “Source Priority”When multiple credentials are available, ghqc prefers them in this order:
- local
ghqcauth store GITHUB_TOKEN- active
gh auth token - stored GitHub CLI credentials
- Git credential manager
.netrc
The Authentication concept page explains the model in more detail.