{"record":{"id":"b4a5d23910a9347f","repo":"git-ecosystem/git-credential-manager","slug":"can-only-use-the-storenames-gpg-credential-sto","errorCode":null,"errorMessage":"Can only use the '{StoreNames.Gpg}' credential store on POSIX systems.\nSee {Constants.HelpUrls.GcmCredentialStores} for more information.","messagePattern":"Can only use the '(.+?)' credential store on POSIX systems\\.\nSee (.+?) for more information\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Core/CredentialStore.cs","lineNumber":280,"sourceCode":"            }\n\n            if (!_context.SessionManager.IsDesktopSession)\n            {\n                var message = $\"Cannot use the '{StoreNames.SecretService}' credential backing store without a graphical interface present.\";\n                _context.Trace2.WriteError(message);\n                throw new Exception(message + Environment.NewLine +\n                                    $\"See {Constants.HelpUrls.GcmCredentialStores} for more information.\"\n                );\n            }\n        }\n\n        private void ValidateGpgPass(out string storeRoot, out string execPath)\n        {\n            if (!PlatformUtils.IsPosix())\n            {\n                var message = $\"Can only use the '{StoreNames.Gpg}' credential store on POSIX systems.\";\n                _context.Trace2.WriteError(message);\n                throw new Exception(message + Environment.NewLine +\n                                    $\"See {Constants.HelpUrls.GcmCredentialStores} for more information.\"\n                );\n            }\n\n            execPath = GetGpgPath();\n\n            // If we are in a headless environment, and don't have the GPG_TTY or SSH_TTY\n            // variables set, then error - we need a TTY device path for pin-entry to work headless.\n            if (!_context.SessionManager.IsDesktopSession &&\n                !_context.Environment.Variables.ContainsKey(\"GPG_TTY\") &&\n                !_context.Environment.Variables.ContainsKey(\"SSH_TTY\"))\n            {\n                var message = \"GPG_TTY is not set; add `export GPG_TTY=$(tty)` to your profile.\";\n                _context.Trace2.WriteError(message);\n                throw new Exception(message + Environment.NewLine +\n                                    $\"See {Constants.HelpUrls.GcmCredentialStores} for more information.\"\n                );\n            }","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/git-ecosystem/git-credential-manager/blob/e8ce762cd04b4100ae637b5fbf39ef9d0a96561e/src/Core/CredentialStore.cs#L262-L298","documentation":"ValidateGpgPass throws this Exception when the credential store is set to '{gpg}' (the pass-style GPG-encrypted store) but the host is not a POSIX system (i.e., Windows). The GPG/pass backing store relies on POSIX tooling and paths, so GCM rejects it during EnsureBackingStore.","triggerScenarios":"Setting credential.store / GCM_CREDENTIAL_STORE to StoreNames.Gpg on Windows; EnsureBackingStore invokes ValidateGpgPass and PlatformUtils.IsPosix() is false.","commonSituations":"Following Unix-oriented pass/GCM tutorials on Windows; shared dotfiles applying the same credential.store to Windows and Linux machines.","solutions":["Use 'wincredman' (Windows Credential Manager) as the store on Windows.","Remove the credential.store override so GCM picks the platform default.","If GPG-backed storage is required on Windows, use GCM's Windows store or run under WSL where POSIX applies."],"exampleFix":"// before (Windows .gitconfig)\n[credential]\n\tstore = gpg\n// after\n[credential]\n\tstore = wincredman","handlingStrategy":"validation","validationCode":"if (storeType === 'gpg' && process.platform === 'win32') {\n  throw new Error('gpg credential store requires a POSIX system');\n}","typeGuard":"const supportsGpgStore = (platform: string) => platform !== 'win32';","tryCatchPattern":null,"preventionTips":["On Windows use wincredman instead of gpg/pass","Avoid syncing credential.store across Windows and Unix machines","Consult GCM docs' per-platform store matrix before configuring"],"tags":["git-credential-manager","gpg","pass","windows","platform"],"backgroundTag":"unsupported-platform","analyzedSha":"e8ce762cd04b4100ae637b5fbf39ef9d0a96561e","analyzedAt":"2026-09-11T17:15:08.753Z","contentChangedAt":"2026-09-11T17:15:08.753Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}