From 71b5d062b5130dffc5425ea400ee1e624fb4dd28 Mon Sep 17 00:00:00 2001 From: Igor Pitsyn Date: Wed, 4 Sep 2024 12:09:57 -0400 Subject: [PATCH] Make GPG Pass store path configurable by git config --- VERSION | 2 +- src/shared/Core/Constants.cs | 1 + src/shared/Core/CredentialStore.cs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 27c7c7b9d..012037873 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.1.0 +2.5.101.0 diff --git a/src/shared/Core/Constants.cs b/src/shared/Core/Constants.cs index ac609adaa..210c991bc 100644 --- a/src/shared/Core/Constants.cs +++ b/src/shared/Core/Constants.cs @@ -162,6 +162,7 @@ public static class Credential public const string DevUseLegacyUiHelpers = "devUseLegacyUiHelpers"; public const string MsAuthUseDefaultAccount = "msauthUseDefaultAccount"; public const string GuiSoftwareRendering = "guiSoftwareRendering"; + public const string GpgPassStorePath = "gpgPassStorePath"; public const string OAuthAuthenticationModes = "oauthAuthModes"; public const string OAuthClientId = "oauthClientId"; diff --git a/src/shared/Core/CredentialStore.cs b/src/shared/Core/CredentialStore.cs index a0c1ed861..83f915d1e 100644 --- a/src/shared/Core/CredentialStore.cs +++ b/src/shared/Core/CredentialStore.cs @@ -276,7 +276,8 @@ private void ValidateGpgPass(out string storeRoot, out string execPath) // Check for a redirected pass store location if (!_context.Settings.TryGetSetting( GpgPassCredentialStore.PasswordStoreDirEnvar, - null, null, + Constants.GitConfiguration.Credential.SectionName, + Constants.GitConfiguration.Credential.GpgPassStorePath, out storeRoot)) { // Use default store root at ~/.password-store