Commit 05ac29e
authored
Keep git credentials in safe_outputs job checkouts (#40161)
The safe_outputs job reuses the agent job's checkout generators, which emit
persist-credentials: false so actions/checkout strips the credential
http.extraheader in its post-checkout "Removing auth" step. That default is
correct for the untrusted agent job, but the safe_outputs job legitimately runs
git fetch/push (create_pull_request, push_to_pull_request_branch), so stripping
auth leaves it relying on a fragile re-auth dance and can break bundle/branch
fetches.
Add a keepCredentialsForPush mode to CheckoutManager that the safe_outputs path
enables. In that mode the default and additional checkout generators emit
persist-credentials: true and skip the credential-cleanup step, leaving the
push-capable token on disk for the handlers. The agent job is unchanged.
Fixes #401591 parent b863814 commit 05ac29e
62 files changed
Lines changed: 107 additions & 69 deletions
File tree
- .github/workflows
- pkg/workflow
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments