From 1acaa146611f8390d046f2ed0f14adf2ac8ab54d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Dec 2025 23:54:21 +0000 Subject: [PATCH] fix(sync): Use token-authenticated URL for git push to consumer repos The sync workflow was failing with 'could not read Username for https://github.com' because the consumer repo clone (via gh) doesn't inherit git credentials for push operations. Fix by pushing directly with the token embedded in the URL: git push https://x-access-token:${GH_TOKEN}@github.com/$repo.git This ensures the SYNC_TOKEN is used for authentication when pushing to each consumer repository. --- .github/workflows/maint-68-sync-consumer-repos.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maint-68-sync-consumer-repos.yml b/.github/workflows/maint-68-sync-consumer-repos.yml index d2e8d7f36..ded334874 100644 --- a/.github/workflows/maint-68-sync-consumer-repos.yml +++ b/.github/workflows/maint-68-sync-consumer-repos.yml @@ -679,9 +679,11 @@ jobs: exit 0 fi - # Configure git + # Configure git with token-based authentication for push git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config credential.helper store + echo "https://x-access-token:${GH_TOKEN}@github.com" > ~/.git-credentials # Create branch branch="sync/workflows-${{ needs.prepare.outputs.template_hash }}" @@ -699,8 +701,8 @@ jobs: Changed files: ${{ steps.detect.outputs.changed_files }}" - # Push - git push origin "$branch" --force + # Push using token-authenticated URL + git push "https://x-access-token:${GH_TOKEN}@github.com/${{ matrix.repo }}.git" "$branch" --force # Create or update PR existing_pr=$(gh pr list --base main --head "$branch" --json number --jq '.[0].number // empty')