Skip to content

Commit 05ac29e

Browse files
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 #40159
1 parent b863814 commit 05ac29e

62 files changed

Lines changed: 107 additions & 69 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/avenger.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/changeset.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/chaos-pr-bundle-fuzzer.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ci-coach.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/cloclo.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/code-scanning-fixer.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/code-simplifier.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/craft.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-architecture-diagram.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)