CI environments, SSH sessions, and containers cannot open a browser for OAuth. GitHits gives you two practical options: authenticate with an API token (recommended for CI) or use theDocumentation Index
Fetch the complete documentation index at: https://docs.githits.com/llms.txt
Use this file to discover all available pages before exploring further.
--no-browser flag to get a URL you can open on another device.
Option 1: API token (recommended for CI)
An API token lets you authenticate without any browser interaction. The token is read from an environment variable, so you can inject it as a CI secret without modifying your code or config files.Get your API token
Log in to githits.com and navigate to your account settings. Copy your API token — it starts with
ghi-.Set the environment variable
Export the token in your shell or add it to your CI configuration as a secret:
GitHub Actions example
Add your API token as a repository secret namedGITHITS_API_TOKEN, then reference it in your workflow:
variables:), CircleCI (project environment variables), and any other CI system that supports injecting secrets as environment variables.
Option 2: Browser-less OAuth
If you need OAuth authentication but cannot open a browser on the same machine, use--no-browser. GitHits prints a URL instead of launching a browser — open it on any device to complete authentication.
Option 3: File storage OAuth (scripted environments)
If you need OAuth credentials persisted for a scripted environment that runs repeatedly, you can store them in a file instead of the system keychain:Choosing the right approach
| Scenario | Recommended approach |
|---|---|
| GitHub Actions, GitLab CI, CircleCI | GITHITS_API_TOKEN secret |
| SSH session with local browser available | npx githits@latest login --no-browser |
| Long-running container, no browser | GITHITS_API_TOKEN |
| Local scripted workflow, trusted machine | File storage OAuth |