Auth Login
ghqc auth login logs in to a GitHub host and can store the resulting token in the local ghqc auth store.
ghqc auth login [TOKEN]Behavior
Section titled “Behavior”Behavior depends on how authentication is provided:
- If
TOKENis passed directly,ghqcvalidates it and stores it immediately. - If
ghis available,ghqcrunsgh auth loginand then imports the resulting token into the local auth store. - If
ghis not available, or if you pass--skip-gh,ghqcopens the personal access token page for the selected host and prompts for a token interactively.
Options
Section titled “Options”| Flag | Description |
|---|---|
--host | GitHub host to use, such as github.com or ghe.example.com. |
--skip-gh | Skip using the gh CLI even when it is installed, and go directly to the manual token flow. |
--no-store | Do not import the token into the local ghqc auth store after a successful gh auth login. |
Examples
Section titled “Examples”ghqc auth loginghqc auth login --host ghe.example.comghqc auth login ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxghqc auth login --no-storeghqc auth login --skip-gh- Host resolution uses
--hostfirst, then the current repository remote. --skip-ghis useful when you want to avoid shelling out to GitHub CLI and enter or paste the token yourself.--no-storeonly affects thegh auth loginflow.- If you want to inspect the result afterward, run
ghqc auth status.