git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 7/7] gitlab-ci: fix hanging MSVC jobs

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 24, 2026, 14:09 UTC
Message-ID
<20260924-pks-meson-improvements-v1-7-90b7f79f1c4e@pks.im>
In-Reply-To
<20260924-pks-meson-improvements-v1-0-90b7f79f1c4e@pks.im>

Starting with GitLab Runner 19.x, the runner executes `git credential reject` in its cleanup stage. This has bad interactions with our build environment because we install our own version of PortableGit, and the runner picks up that version of Git. The consequence is that we invoke PortableGit's default credential manager, which is Git Credential Manager for Windows. GCM then tries to use Windows Credential Manager, but it cannot and thus the job hangs in its cleanup phase forever.

Fix this hang by unsetting the credential helper after installing PortableGit. This means that `git credential reject` becomes a no-op, and thus the cleanup succeeds again.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/install-dependencies.ps1 | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1
index e3b367fa54..2ceb5dd99a 100755
--- a/ci/install-dependencies.ps1
+++ b/ci/install-dependencies.ps1
@@ -53,3 +53,11 @@ Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\Meson', '/quiet',
 $rustMsi = Get-Installer "rust.msi" `
     "https://static.rust-lang.org/dist/rust-$RustVersion-x86_64-pc-windows-msvc.msi"
 Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\Rust', 'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')
+
+# Disable Git Credential Manager, which is auto-configured by PortableGit.
+# GitLab's runner picks up this Git in its cleanup stage and runs `git
+# credential reject`, which hangs in GCM and makes the job time out.
+& "C:\Program Files\Git\bin\git.exe" config unset --all --system credential.helper
+if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 5) {
+    throw "Failed to unset credential.helper with exit code $LASTEXITCODE"
+}
-- 
2.56.0.rc2.329.gd58861e689.dirty
Previous: Patrick SteinhardtNext: Karthik Nayak
Message 16 of 20 in “A couple of Meson improvements”
  1. 0/7 A couple of Meson improvementsPatrick Steinhardt, Sep 24, 2026
  2. 1/7 meson: avoid recompiling HTTP sources several timesPatrick Steinhardt, Sep 24, 2026
  3. Karthik NayakSep 30, 2026
  4. Kaartic SivaraamOct 5, 2026
  5. 2/7 meson: don't recompile git-remote-http(1) multiple times for testsPatrick Steinhardt, Sep 24, 2026
  6. 3/7 meson: use precompiled headers for our test-helperPatrick Steinhardt, Sep 24, 2026
  7. Karthik NayakSep 30, 2026
  8. 4/7 meson: use precompiled headers for unit testsPatrick Steinhardt, Sep 24, 2026
  9. Kaartic SivaraamOct 5, 2026
  10. Patrick SteinhardtOct 5, 2026
  11. 5/7 meson: fix outdated completion helpersPatrick Steinhardt, Sep 24, 2026
  12. 6/7 meson: update wrappersPatrick Steinhardt, Sep 24, 2026
  13. Karthik NayakSep 30, 2026
  14. Kaartic SivaraamOct 5, 2026
  15. Patrick SteinhardtOct 5, 2026
  16. 7/7 gitlab-ci: fix hanging MSVC jobsPatrick Steinhardt, Sep 24, 2026
  17. Karthik NayakSep 30, 2026
  18. Patrick SteinhardtSep 30, 2026
  19. Karthik NayakSep 30, 2026
  20. Kaartic SivaraamOct 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.