From e2814de101f64491ba5c46526592c1a8b335a0a1 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Mon, 11 Sep 2017 11:09:07 -0400 Subject: [PATCH] Logging what credential manager is configured in a few situations --- src/GitHub.Api/Application/ApplicationManagerBase.cs | 9 ++++++++- src/GitHub.Api/Git/GitCredentialManager.cs | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/GitHub.Api/Application/ApplicationManagerBase.cs b/src/GitHub.Api/Application/ApplicationManagerBase.cs index 002b61122..d48a008d9 100644 --- a/src/GitHub.Api/Application/ApplicationManagerBase.cs +++ b/src/GitHub.Api/Application/ApplicationManagerBase.cs @@ -64,8 +64,15 @@ private async Task SetupGit() if (Environment.IsWindows) { var credentialHelper = await GitClient.GetConfig("credential.helper", GitConfigSource.Global).StartAwait(); - if (string.IsNullOrEmpty(credentialHelper)) + + if (!string.IsNullOrEmpty(credentialHelper)) + { + Logger.Trace("Windows CredentialHelper: {0}", credentialHelper); + } + else { + Logger.Warning("No Windows CredentialHeloper found: Setting to wincred"); + await GitClient.SetConfig("credential.helper", "wincred", GitConfigSource.Global).StartAwait(); } } diff --git a/src/GitHub.Api/Git/GitCredentialManager.cs b/src/GitHub.Api/Git/GitCredentialManager.cs index 8cccd3809..4922d7a26 100644 --- a/src/GitHub.Api/Git/GitCredentialManager.cs +++ b/src/GitHub.Api/Git/GitCredentialManager.cs @@ -133,6 +133,8 @@ private async Task LoadCredentialHelper() .Configure(processManager) .StartAwait(); + Logger.Trace("Loaded Credential Helper: {0}", credHelper); + if (credHelper != null) { return true;