Skip to content

Commit 0072206

Browse files
authored
ci: don't bake the checkout token into shipped images
2 parents cb6e3bf + 2bc77ef commit 0072206

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ jobs:
8282
# Empty for tag push (checks out the tag); honored for manual dispatch
8383
# to release an arbitrary commit.
8484
ref: ${{ github.event.inputs.ref }}
85+
# This working tree is baked into the image at /etc/nixos-repo (via
86+
# box-turnkey.nix's self.outPath). Don't persist the job token as an
87+
# http.*.extraheader in .git/config, or the dead token ships in the
88+
# image and makes `git pull` on installed boxes prompt for creds. The
89+
# repo is public, so `git pull` on the box works anonymously.
90+
persist-credentials: false
8591

8692
# Install Nix natively + cache the /nix/store (shared with the test
8793
# workflow so releases build the exact same way).

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ jobs:
170170
# Empty for push/PR (checks out the event ref); honored for manual
171171
# dispatch to build an arbitrary commit.
172172
ref: ${{ github.event.inputs.ref }}
173+
# This working tree is baked into the image at /etc/nixos-repo (via
174+
# box-turnkey.nix's self.outPath). actions/checkout defaults to
175+
# persisting the job's short-lived token as an http.*.extraheader in
176+
# .git/config; baked in, that dead token makes `git pull` on installed
177+
# boxes prompt for credentials. Don't persist it (the repo is public;
178+
# the initial fetch still authenticates, and `git pull` on the box
179+
# works anonymously).
180+
persist-credentials: false
173181

174182
# Install Nix natively + cache the /nix/store (shared with the release
175183
# workflow so both build images the exact same way).

0 commit comments

Comments
 (0)