Supported Providers
gitfetch supports multiple Git hosting platforms with different authentication methods.
GitHub
Authentication: Uses GitHub CLI (gh)
Setup:
- Install GitHub CLI:
brew install gh(macOS) or follow official instructions - Run
gh auth loginto authenticate - gitfetch will detect and use your GitHub credentials
Token Configuration:
You can also set a token via:
- Config file: set
tokenin[github]section of~/.config/gitfetch/gitfetch.conf - Environment variable:
GH_TOKEN
Rate Limits:
- No token: 60 requests/hour (limited, may hit limits)
- With token: 5,000 requests/hour (recommended)
GitLab
Authentication: Uses GitLab CLI (glab)
Setup:
- Install GitLab CLI:
brew install glab(macOS) or follow official instructions - Run
glab auth loginto authenticate - gitfetch will detect and use your GitLab credentials
Token Configuration:
You can also set a token via:
- Config file: set
tokenin[gitlab]section of~/.config/gitfetch/gitfetch.conf - Environment variable:
GITLAB_TOKEN
Gitea/Forgejo/Codeberg
Authentication: Personal access tokens
Setup:
- Generate a personal access token in your account settings
- During gitfetch setup, select Gitea/Forgejo/Codeberg
- Enter your instance URL and personal access token
Supported Instances:
- Gitea (any instance)
- Forgejo (any instance)
- Codeberg (codeberg.org)
Sourcehut
Authentication: Personal access tokens
Setup:
- Generate an OAuth2 personal access token in your account settings
- During gitfetch setup, select Sourcehut
- Enter your personal access token
Provider Configuration
You can change your configured provider at any time:
gitfetch --change-provider
The provider setting is stored in your configuration file at ~/.config/gitfetch/gitfetch.conf.