{"record":{"id":"2412fe0206934f2f","repo":"git-ecosystem/git-credential-manager","slug":"can-only-use-the-storenames-secretservice-cred","errorCode":null,"errorMessage":"Can only use the '{StoreNames.SecretService}' credential store on Linux.\nSee {Constants.HelpUrls.GcmCredentialStores} for more information.","messagePattern":"Can only use the '(.+?)' credential store on Linux\\.\nSee (.+?) for more information\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Core/CredentialStore.cs","lineNumber":259,"sourceCode":"        private void ValidateMacOSKeychain()\n        {\n            if (!PlatformUtils.IsMacOS())\n            {\n                var message = $\"Can only use the '{StoreNames.MacOSKeychain}' credential store on macOS.\";\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 ValidateSecretService()\n        {\n            if (!PlatformUtils.IsLinux())\n            {\n                var message = $\"Can only use the '{StoreNames.SecretService}' credential store on Linux.\";\n                _context.Trace2.WriteError(message);\n                throw new Exception(message + Environment.NewLine +\n                                    $\"See {Constants.HelpUrls.GcmCredentialStores} for more information.\"\n                );\n            }\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            {","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/git-ecosystem/git-credential-manager/blob/e8ce762cd04b4100ae637b5fbf39ef9d0a96561e/src/Core/CredentialStore.cs#L241-L277","documentation":"ValidateSecretService throws this Exception when the credential store is set to '{secretService}' (the freedesktop.org Secret Service / libsecret API) on a non-Linux platform. The Secret Service D-Bus API only exists on Linux, so GCM rejects the configuration up front in EnsureBackingStore.","triggerScenarios":"Setting credential.store / GCM_CREDENTIAL_STORE to StoreNames.SecretService on macOS or Windows; EnsureBackingStore calls ValidateSecretService and PlatformUtils.IsLinux() is false.","commonSituations":"Linux-tuned CI configs reused on macOS dev machines; WSL users assuming Secret Service works under Windows; docs recommending 'secretservice' without OS caveats.","solutions":["Change credential.store / GCM_CREDENTIAL_STORE to a store valid for the current OS (e.g. 'gpg', 'cache', or the default).","Remove the setting entirely to let GCM choose the platform default.","On WSL, either use the Windows store via GCM for Windows or configure gpg/pass inside the WSL distro."],"exampleFix":"// before (macOS ~/.gitconfig)\n[credential]\n\tstore = secretservice\n// after\n[credential]\n\tstore = macOSkeychain","handlingStrategy":"validation","validationCode":"if (storeType === 'secretservice' && process.platform !== 'linux') {\n  console.warn('secretservice store is Linux-only; falling back to default');\n}","typeGuard":"const isSecretServiceUsable = (store: string, platform: string) =>\n  store === 'secretservice' ? platform === 'linux' : true;","tryCatchPattern":null,"preventionTips":["Check the target OS before copying Linux credential configs to other machines","Prefer omitting credential.store and using GCM auto-detection","Document per-OS store choices in team setup guides"],"tags":["git-credential-manager","credential-store","linux","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"}