From b70001b4b18178cf4f05029d23ddcb0a5b978416 Mon Sep 17 00:00:00 2001 From: b267a Date: Fri, 30 Jan 2026 18:59:59 +0100 Subject: [PATCH] Refactor credential handling in sync workflow to ensure proper configuration before pushing to public repo --- .github/workflows/sync-to-public.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-to-public.yml b/.github/workflows/sync-to-public.yml index e2d22cd..f76e9bf 100644 --- a/.github/workflows/sync-to-public.yml +++ b/.github/workflows/sync-to-public.yml @@ -52,8 +52,10 @@ jobs: git rm .github/workflows/sync-to-public.yml git commit -m "Remove sync workflow for public repo" - # Explicitly set credentials for the public repo - git config --global credential.https://github.com.helper '!f() { echo "username=x-access-token"; echo "password=${TOKEN}"; }; f' + # Remove ALL existing credential helpers and use store + git config --global --unset-all credential.helper || true + git config --global credential.helper store + echo "https://x-access-token:${TOKEN}@github.com" > ~/.git-credentials # Push to public repo git remote add public https://github.com/wiestju/anny-booking-automation.git