From 3dffbb849377c9286a915ac73978d64cfe147656 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 28 May 2026 13:22:40 +0200 Subject: [PATCH] fix(update/open_pr): strip every extraheader via regex + log what was hit Previous attempts targeted a specific config key path (`http.https://github.com/.extraheader`). If actions/checkout v6 stores it under a different subsection naming, our unset/remove-section no-ops silently and the GITHUB_TOKEN-bearing header keeps overriding the App-token URL credentials. Walk every `http.*.extraheader` entry the local config holds, pipe the matched key names through xargs to unset-all each one, and dump the remaining `http.*` config before pushing so the next CI run proves what was stripped. The push itself still uses an x-access-token URL so the App's installation token is the only Authorization that reaches the wire. Co-Authored-By: Claude Opus 4.7 --- scripts/github/update/open_pr.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/github/update/open_pr.sh b/scripts/github/update/open_pr.sh index 2cead18b4b..a84a1f17d9 100755 --- a/scripts/github/update/open_pr.sh +++ b/scripts/github/update/open_pr.sh @@ -79,8 +79,13 @@ if [[ -n "${DUPLICATE_PR}" ]]; then exit 0 fi -git config --local --unset-all "http.https://github.com/.extraheader" 2>/dev/null || true # nocheck: url -git config --local --remove-section "http.https://github.com/" 2>/dev/null || true # nocheck: url +echo "--- Stripping every http.*.extraheader from local config ---" +git config --local --name-only --get-regexp '^http\..*\.extraheader$' 2>/dev/null | + tee /dev/stderr | + xargs -r -I{} git config --local --unset-all '{}' 2>/dev/null || true +echo "--- Remaining http.* config after strip: ---" +git config --local --get-regexp '^http\.' 2>/dev/null || true +echo "--- Pushing with App-token-embedded URL ---" git push --force \ "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git" \ "HEAD:refs/heads/${BRANCH}"