Authentication
Configure authentication for private sources and registries.
Quick setup
bash
# Token for git sources (github:, gitlab:)
grekt config token set
# Registry for scoped artifacts (@scope/name)
grekt config registry set @myteamBoth commands are interactive and store credentials in .grekt/config.yaml (gitignored).
Token priority
grekt checks these locations in order and uses the first token found:
Git sources (github: / gitlab:)
- Token in
.grekt/config.yamltokenssection - Environment variable:
GITHUB_TOKEN/GITLAB_TOKEN
Registries (@scope/name)
- Token in
.grekt/config.yamlregistry entry - Environment variable:
GITLAB_TOKENorGITHUB_TOKEN
WARNING
Environment variables only work for github.com and gitlab.com. For self-hosted instances, use grekt config token set.
Troubleshooting
Authentication required
Error: Authentication required for @myteamRun grekt config token set or grekt config registry set @scope.
Permission denied
Error: 403 ForbiddenCheck token has required scopes. For GitLab registries, Deploy Tokens with read_package_registry / write_package_registry are recommended over PATs. See GitLab Authentication.