Skip to content

UCRT64: Install a Git Credential Manager compatibility shim in the old MINGW64 place - #224

Merged
dscho merged 4 commits into
mainfrom
gcm-mingw64-compat
Oct 2, 2026
Merged

dscho merged 4 commits into
mainfrom
gcm-mingw64-compat

Conversation

@dscho

@dscho dscho commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Many a Git Credential User ("GCM") who also uses the Windows Subsystem for Linux ("WSL") configured something like this in their WSL config to reuse the Windows GCM:

[credential]
  helper = "/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe"

Obviously this was playing with fire because the exact path is an implementation detail (it used to be /mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager.exe, for example, and it was changed without much in the way of announcing that transition as its location is considered, as mentioned above, an implementation detail).

Nevertheless, Hyrum's Law seems to strike once more.

Try to be helpful by installing the Git wrapper in the old location, delegate to GCM in the new location, but not before warning about the obsolete configuration. (Actually, we cannot warn about the configuration because we don't know at that stage where this was configured, or whether it was configured at all, but we can warn about the obsolete path.)

This addresses git-for-windows/git#6455.

@dscho dscho self-assigned this Oct 2, 2026
dscho added 4 commits October 2, 2026 14:22
Some users hard-code references to files that come with Git for Windows,
e.g. `/mingw64/bin/git-credential-manager.exe/. This is of course
fraught with peril because Git for Windows considers these paths as
implementation details that are subject to change.

Git Credential Manager, for example, is a prominent candidate for such
configurations as it is possible to reuse it from the Windows Subsystem
for Linux (WSL), in which case the reference _must_ be an absolute path.

Therefore, WSL users in particular are affected by the change in Git for
Windows v2.56.0, where `git-credential-manager.exe` moved to
`/ucrt64/bin/`, leaving the original location empty.

Prepare the UCRT64 Git wrapper to be able to serve as a drop-in shim
that delegates from, say, `/mingw64/bin/git-credential-manager.exe` to
`/ucrt64/bin/git-credential-manager.exe`.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Johannes Schindelin <[email protected]>
Git Credential Manager is included in Git for Windows. Currently, it is
installed into the `/ucrt64/bin/` directory, but it used to be installed
into `/mingw64/bin/`.

Help users who hard-coded the old location (say, for use in Windows
Subsystem for Linux) by dropping the Git wrapper into the old location;
It just learned to detect that location and to delegate to the
executable in the new location.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows performed a rather big migration from MINGW64 to UCRT64.
The most visible consequence is that most of the executables no longer
live in `/mingw64/bin/` but in `/ucrt64/bin/`.

Since there are a few legitimate reasons to hard-code the path to such
an executable (e.g. when configuring Git Credential Manager ("GCM") in
the Windows Subsystem for Linux to reuse the Windows GCM), and since
most users seem not to read the release notes, this lead to problems to
such an extent that we now install a shim in the old location that
delegates to the new location.

Nevertheless, the users should be notified that they need to adjust
their configuration. Let's given them a warning that might be just
persistent enough that they adapt their config accordingly.

Signed-off-by: Johannes Schindelin <[email protected]>
This trick was performed by `updpkgsums`.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho force-pushed the gcm-mingw64-compat branch from 2d3da2e to 3fee6be Compare October 2, 2026 12:23
@dscho
dscho merged commit 8c33aaf into main Oct 2, 2026
3 checks passed
@dscho
dscho deleted the gcm-mingw64-compat branch October 2, 2026 12:52
github-actions Bot pushed a commit to git-for-windows/build-extra that referenced this pull request Oct 3, 2026
To help with fixing [stale references to the Git Credential
Manager](git-for-windows/git#6455) after Git
for Windows v2.56.0's MINGW64 -> UCRT64 migration, [a compatibility shim
is now
installed](git-for-windows/MINGW-packages#224).

Signed-off-by: gitforwindowshelper[bot] <[email protected]>
dscho added a commit to microsoft/git that referenced this pull request Oct 16, 2026
Some users hard-code Git Credential Manager's location in their WSL
configuration. When it moved from `/mingw64/bin/` to `/ucrt64/bin/`, these
configurations stopped working.

To help those users, we recently added an opt-in wrapper in
git-for-windows/MINGW-packages#224 that warns
about the deprecated path and delegates to the new location.

Let's include this wrapper in our release builds.

Assisted-by: GPT-6.1 Sol
Assisted-by: Gemini Argon
Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to microsoft/git that referenced this pull request Oct 16, 2026
Some WSL users configured Git Credential Manager with an absolute
Windows path under `C:\Program Files\Git\mingw64\bin`. The move to
UCRT64 broke those configurations, so let's give affected users a way to
keep working while they update their setup.

The compatibility wrapper added in
git-for-windows/MINGW-packages#224 forwards
requests to the new location and warns about the deprecated path. Let's
opt in for the Azure release build by setting `WITH_MINGW64_GCM_WRAPPER`
so our Windows installer includes that transition help.
dscho added a commit to git-for-windows/git-for-windows-automation that referenced this pull request Oct 30, 2026
The UCRT64 transition moved Git Credential Manager ("GCM") to
ucrt64/bin, but many Windows Subsystem for Linux ("WSL") setups use the
Windows version of GCM, i.e. point to
`mingw64/bin/git-credential-manager.exe`. Preserve that path to avoid
breaking existing configurations, with a warning that suggests to point
to the new location instead.

The compatibility wrapper requires an explicit opt-in; see
git-for-windows/MINGW-packages#224 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants