fix(ci): use global git config for http.extraheader

The docs workflow copies the checkout to a work directory before the
credential setup step runs. The action then operates on the copy, so
--local config on the original checkout is not visible. Switch to
--global so credentials apply to all git operations on the runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2026-07-08 16:10:22 +02:00
parent e64c604d87
commit 04ae38ba96
2 changed files with 2 additions and 3 deletions

View File

@@ -52,9 +52,8 @@ jobs:
- name: Set up git credentials for gh-pages push
run: |
cd ${{ env.collection_dir }}
BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
git config --local http.https://github.com/.extraheader \
git config --global http.https://github.com/.extraheader \
"AUTHORIZATION: basic ${BASIC_AUTH}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -61,7 +61,7 @@ jobs:
- name: Set up git credentials
run: |
BASIC_AUTH=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
git config --local http.https://github.com/.extraheader \
git config --global http.https://github.com/.extraheader \
"AUTHORIZATION: basic ${BASIC_AUTH}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}