feature: supports to use git-credential-libsecret instead of git-credential-manager on Linux (#1560)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-07-16 16:26:28 +08:00
parent 5ed2c7b793
commit dba6b7555e
7 changed files with 50 additions and 11 deletions

View File

@@ -310,6 +310,20 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _gitDefaultCloneDir, value);
}
public bool UseLibsecretInsteadOfGCM
{
get => Native.OS.CredentialHelper.Equals("libsecret", StringComparison.Ordinal);
set
{
var helper = value ? "libsecret" : "manager";
if (OperatingSystem.IsLinux() && !Native.OS.CredentialHelper.Equals(helper, StringComparison.Ordinal))
{
Native.OS.CredentialHelper = helper;
OnPropertyChanged();
}
}
}
public int ShellOrTerminal
{
get => _shellOrTerminal;