public bool SolveGitCredentialStore() { if (!CheckGitCredentialStore()) { string gcsFileName = Path.Combine(AppSettings.GetInstallDir(), @"GitCredentialWinStore\git-credential-winstore.exe"); if (File.Exists(gcsFileName)) { var config = GlobalConfigFileSettings; if (EnvUtils.RunningOnWindows()) { config.SetValue("credential.helper", "!\\\"" + GitCommandHelpers.FixPath(gcsFileName) + "\\\""); } else if (EnvUtils.RunningOnMacOSX()) { config.SetValue("credential.helper", "osxkeychain"); } else { config.SetValue("credential.helper", "cache --timeout=300"); // 5 min } return(true); } return(false); } return(true); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); _NO_TRANSLATE_versionLabel.Text = string.Format(_version.Text, AppSettings.GitExtensionsVersionString); if (EnvUtils.RunningOnUnix()) { _NO_TRANSLATE_osLabel.Text = "Unix"; } if (EnvUtils.RunningOnMacOSX()) { _NO_TRANSLATE_osLabel.Text = "MacOSX"; } if (EnvUtils.RunningOnWindows()) { _NO_TRANSLATE_osLabel.Text = "Windows"; } }
private void SuggestGitCred_Click(object sender, EventArgs e) { string gcsFileName = Path.Combine(AppSettings.GetInstallDir(), @"GitCredentialWinStore\git-credential-winstore.exe"); if (!File.Exists(gcsFileName)) { GitCredPath.Text = ""; return; } if (EnvUtils.RunningOnWindows()) { GitCredPath.Text = "!\"" + gcsFileName + "\""; } else if (EnvUtils.RunningOnMacOSX()) { GitCredPath.Text = "osxkeychain"; } else { GitCredPath.Text = "cache --timeout=300"; // 5 min } }