From a13ef97372609e6dc4732a9c26a8c22d44d86d74 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Tue, 7 Jul 2026 10:34:10 +0200 Subject: [PATCH] fix(ci): use http.extraheader instead of credential helper The credential helper approach fails because GITHUB_TOKEN env var is not available when git push runs inside collection-docs-action. Switch to http.extraheader which embeds the auth as a static git config value, matching the approach checkout v4 used. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Felix Matouschek --- .github/workflows/docs.yml | 5 +++-- .github/workflows/release.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4a76a57..8b5e8fd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -53,8 +53,9 @@ jobs: - name: Set up git credentials for gh-pages push run: | cd ${{ env.collection_dir }} - git config credential.helper \ - '!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f' + BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64) + git config --local http.https://github.com/.extraheader \ + "AUTHORIZATION: basic ${BASIC_AUTH}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 827e578..5be1577 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,8 +60,9 @@ jobs: - name: Set up git credentials run: | - git config credential.helper \ - '!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f' + BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64) + git config --local http.https://github.com/.extraheader \ + "AUTHORIZATION: basic ${BASIC_AUTH}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}