ci(hacktoberfest_prep): authenticate git push via gh credential helper - #15262
Merged
cclauss merged 1 commit intoSep 10, 2026
Merged
Conversation
cclauss
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your change
Fixes the
hacktoberfest_prepscheduled/manual workflow, which has been failing on the "Open or update the tracker pull request" step (example run):Root cause: the
actions/checkoutstep runs withpersist-credentials: false, so git is left with no stored token. The step then calls plaingit push, which has nothing to authenticate with.GH_TOKENis only wired into theghCLI, not into git itself, sogh pr createwould work but thegit pushbefore it never gets that far.Fix: run
gh auth setup-gitbefore the push. That registers the already-bundledghas git's credential helper (credential.https://github.com.helper = !gh auth git-credential), sogit pushreusesGH_TOKEN. No third-party action, and — unlike embedding the token in the remote URL — nothing secret is written into git config.Keeping
persist-credentials: falseis deliberate (it's the safer default zizmor recommends); this just restores auth for the one push that needs it.