Skip to content

Commit 236ea3a

Browse files
ci(hacktoberfest_prep): authenticate git push via gh credential helper (#15262)
1 parent 9e1cf59 commit 236ea3a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/hacktoberfest_prep.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ jobs:
8080
fi
8181
git config --global user.name "$GITHUB_ACTOR"
8282
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
83+
# `actions/checkout` runs with `persist-credentials: false`, so git has
84+
# no token to authenticate the push below (it fails with
85+
# `fatal: could not read Username for 'https://github.com'`). Wire the
86+
# bundled `gh` in as git's credential helper so `git push` reuses
87+
# GH_TOKEN — no third-party action and no token baked into the remote URL.
88+
gh auth setup-git
8389
git switch -c "$BRANCH"
8490
git add docs/hacktober_2026_prep.md
8591
git commit -m "chore: refresh Hacktoberfest 2026 prep tracker"

0 commit comments

Comments
 (0)