Configure and use GitHub auth token when executing `atmos vendor pull` commands @Listener430 @aknysh (#912)
what
- Use GitHub token when executing
atmos vendor pull
commands - Intorduce environment variables
GITHUB_TOKEN
andATMOS_GITHUB_TOKEN
to specify a GitHub Bearer token for authentication in GitHub API requests - Add custom GitHub URL detection and transformation for improved package downloading
why
- When pulling from private GitHub repos, GitHub has a rate limit for anonymous requests (which made
atmos vendor pull
fail when vendoring from private GitHub repositories)
description
In the case when either the ATMOS_GITHUB_TOKEN
or GITHUB_TOKEN
variable is configured with a GitHub Bearer Token, vendor files are downloaded with go-getter
using the token. The token is put into the URL, and the requests to the GitHub API are not affected to anonymous users rate limits
test
github.com/analitikasi/Coonector.git
is a private repo
- component: "weather"
source: "github.com/analitikasi/Coonector.git//quick-start-simple/components/terraform/{{ .Component }}?ref={{.Version}}"
version: "main"
targets:
- "components/terraform/{{ .Component }}/{{.Version}}"
tags:
- demo