From 75325a2f2417bd21080889ed92e93df4530f027a Mon Sep 17 00:00:00 2001 From: jwinterm Date: Wed, 20 May 2026 15:23:49 -0400 Subject: [PATCH] Windows CI: configure git identity before any submodule ops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/monero_c/apply_patches.sh (run by prepare_moneroc.sh) does git-commit-equivalents that fail when the user.email + user.name aren't set. The runner service runs as LocalSystem, which has no global git config — git rejects with: fatal: unable to auto-detect email address (got 'SYSTEM@DESKTOP-IIM2FS2.(none)') Add a "Configure git identity + safe.directory" step right after checkout, mirroring the Android workflow's "Configure git inside the container" step. Also pre-empt git's safe.directory check, since the checkout dir owner may not match the LocalSystem identity. --- .github/workflows/build-windows.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index d73d680f..ede54b0f 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -45,6 +45,19 @@ jobs: with: fetch-depth: 1 + # ---- Git config for LocalSystem --------------------------------------- + # The runner service runs as LocalSystem, which has no global git + # identity. scripts/monero_c/apply_patches.sh (and a few other + # submodule operations) do `git commit`-equivalents that need + # user.email + user.name set. Also pre-empt git's "safe.directory" + # check, which fires when the checkout dir owner != runner identity. + - name: Configure git identity + safe.directory + run: | + git config --global --add safe.directory '*' + git config --global user.email "ci@suchsoftware.com" + git config --global user.name "Hash Bags CI" + git config --global --list + # ---- Toolchain sanity ------------------------------------------------ # Our self-hosted runner has Flutter / Rust / VS Build Tools / Inno # Setup pre-installed (see scripts/windows/setup-windows-runner.ps1). -- 2.50.1 (Apple Git-155)