Repository navigation
Conversation
github.com throttles anonymous fetches per source IP, and the shared self-hosted runners trip that limit: the git-upload-pack POST comes back 401 while the ref advertisement still succeeds, so clones fail in bursts with "could not read Username for 'https://github.com'". The build clones linuxkit on every job, so any job can hit it. Answer github.com's credential challenge with the job's own token via a GIT_ASKPASS helper. Git consults askpass only after the server challenges, so an anonymous fetch is still attempted first and the token is used only where an anonymous fetch just failed. The helper declines prompts for any other host, so the token never reaches a third-party remote, and declines when no token is set, leaving git to fail exactly as it does today. Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Dockerfile git sources (`ADD https://github.com/...git#ref`) are fetched by buildkitd, not by the runner's git: it runs git with a cleared environment and HOME=/dev/null, so neither gitconfig nor GIT_ASKPASS reaches it and these fetches, including recursive submodules, stay anonymous. GitHub intermittently refuses them; eve-uefi, whose edk2 source pulls in ~40 nested submodules, failed every attempt on a 17.0-stable run. When GITHUB_TOKEN is set, pass it to `linuxkit pkg build/push` as the GIT_AUTH_TOKEN.github.com secret, which buildkit's git source uses for every github.com remote. This needs `pkg build --secret`, not yet in a linuxkit release, so pin linuxkit to a fork commit carrying it until it lands upstream. Signed-off-by: Paul Gaiduk <paulg@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three Dockerfiles cloned from github.com with `RUN git clone`. That git runs inside the build container, which sees neither GIT_ASKPASS nor buildkit's git auth secret, so the clones stayed anonymous and fail whenever GitHub refuses anonymous fetches. Fetch them with `ADD <url>.git#<ref>` instead, which buildkit authenticates. Pass GITHUB_TOKEN as that secret to the builds that don't go through the top-level Makefile: evetest's protobuilder and SDN VM images, the cross-compilers workflow, and the yetus image, whose openzfs source was already an ADD. publish-evetest now builds the SDN image with the pinned linuxkit instead of one on PATH, which may not support --secret. protodot was cloned at whatever its default branch pointed to; pin it to the current head. The scep ref now comes from SCEP_SERVER_VERSION, which was declared but unused. Signed-off-by: Paul Gaiduk <paulg@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
Changes the package hash so CI builds eve-uefi from source instead of pulling it, exercising buildkit's authenticated edk2 submodule fetches. Signed-off-by: Paul Gaiduk <paulg@zededa.com>
|
Claude finished @europaul's task in 30s —— View job Review
The diff adds a single comment line to # [TEST ONLY] force a rebuild to exercise authenticated ADD git fetchesThis is a no-op source change whose only effect is to invalidate the linuxkit package hash, forcing CI to build No code-quality, correctness, security, or performance issues. The comment is inserted after the One minor housekeeping note: since this is explicitly a Nothing to change for the test's purpose. ✅ |
Test-only PR, do not merge.
Changes pkg/uefi's package hash so that CI builds eve-uefi from source instead of pulling it. That exercises buildkit's authenticated fetches of edk2 and all its nested submodules, via
linuxkit pkg build --secret id=GIT_AUTH_TOKEN.github.com,env=GITHUB_TOKEN(lf-edge#6682).🤖 Generated with Claude Code