git-ecosystem/git-credential-manager · error · Exception

Can not use the ' ' credential store on Windows due to lack…

Error message

Can not use the '{StoreNames.Cache}' credential store on Windows due to lack of UNIX socket support in Git for Windows.
See {Constants.HelpUrls.GcmCredentialStores} for more information.

What it means

ValidateCredentialCache rejects the '{cache}' credential store on Windows. The cache store communicates over a UNIX domain socket, which Git for Windows did not support at the time, so GCM throws before attempting to spawn `git credential-cache`.

Solutions

  1. Use 'wincredman' on Windows for persisted credentials, or remove credential.store to use the default.
  2. For short-lived caching semantics on Windows, rely on the OS credential manager instead of the cache store.
  3. Run the workflow inside WSL where UNIX sockets work if cache is strictly required.

Example fix

// before (Windows)
[credential]
	store = cache
// after
[credential]
	store = wincredman
Defensive patterns

Strategy: validation

Validate before calling

if (storeType === 'cache' && process.platform === 'win32') {
  console.warn('cache store unsupported on Windows (no UNIX socket support); use wincredman');
}

Type guard

const supportsCacheStore = (platform: string) => platform !== 'win32';

Prevention

When it happens

Trigger: Setting credential.store / GCM_CREDENTIAL_STORE to StoreNames.Cache on any Windows host; EnsureBackingStore calls ValidateCredentialCache and PlatformUtils.IsWindows() is true.

Common situations: Copying Linux .gitconfig with store=cache to Windows; trying to get short-lived in-memory credential caching on Windows.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of git-ecosystem/git-credential-manager@e8ce762cd0 (2026-09-11). Data as JSON: /api/errors/4bf6317bdb97cf79. Report an issue: GitHub.

Appendix: source

Thrown at src/Core/CredentialStore.cs:319

            if (!_context.Settings.TryGetSetting(
                GpgPassCredentialStore.PasswordStoreDirEnvar,
                Constants.GitConfiguration.Credential.SectionName,
                Constants.GitConfiguration.Credential.GpgPassStorePath,
                out storeRoot))
            {
                // Use default store root at ~/.password-store
                storeRoot = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".password-store");
            }

        }

        private void ValidateCredentialCache(out string options)
        {
            if (PlatformUtils.IsWindows())
            {
                var message = $"Can not use the '{StoreNames.Cache}' credential store on Windows due to lack of UNIX socket support in Git for Windows.";
                _context.Trace2.WriteError(message);
                throw new Exception(message + Environment.NewLine +
                                    $"See {Constants.HelpUrls.GcmCredentialStores} for more information."
                );
            }

            // allow for --timeout and other options
            if (!_context.Settings.TryGetSetting(
                Constants.EnvironmentVariables.GcmCredCacheOptions,
                Constants.GitConfiguration.Credential.SectionName,
                Constants.GitConfiguration.Credential.CredCacheOptions,
                out options))
            {
                options = string.Empty;
            }
        }

        private void ValidatePlaintext(out string storeRoot)
        {
            // Check for a redirected credential store location

View on GitHub (pinned to e8ce762cd0)