You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate 'Authorization' header (HTTP 400) on git ops in push_to_pull_request_branch safe output #40280
Because the key is multi-valued, git sends both values, producing two Authorization headers on the wire → the server rejects the request with Duplicate header: 'Authorization' / HTTP 400.
create_pull_request.cjs already relies solely on the persisted .git/config credentials and does not inject getGitAuthEnv — push_to_pull_request_branch.cjs was the lone outlier.
A secondary issue: the persisted checkout credential used the default GITHUB_TOKEN rather than the resolved PR push token, so custom-PAT / cross-repo push configurations could persist the wrong credential.
Fix
Stop the handler from injecting a second credential — rely on the credentials persisted in .git/config by the checkout (consistent with create_pull_request.cjs).
Persist the resolved PR push token (resolvePRCheckoutToken) into the safe_outputs checkout so the single retained credential is the correct one (also fixes custom-PAT / cross-repo cases).
getGitAuthEnv remains in git_helpers.cjs for the other handlers that still need it (gh operations / cleaned-credential contexts).
Activity
Fix duplicate Authorization header (HTTP 400) on git ops in push_to_p…