Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit e2814de

Browse files
Logging what credential manager is configured in a few situations
1 parent 1868d98 commit e2814de

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,15 @@ private async Task SetupGit()
6464
if (Environment.IsWindows)
6565
{
6666
var credentialHelper = await GitClient.GetConfig("credential.helper", GitConfigSource.Global).StartAwait();
67-
if (string.IsNullOrEmpty(credentialHelper))
67+
68+
if (!string.IsNullOrEmpty(credentialHelper))
69+
{
70+
Logger.Trace("Windows CredentialHelper: {0}", credentialHelper);
71+
}
72+
else
6873
{
74+
Logger.Warning("No Windows CredentialHeloper found: Setting to wincred");
75+
6976
await GitClient.SetConfig("credential.helper", "wincred", GitConfigSource.Global).StartAwait();
7077
}
7178
}

src/GitHub.Api/Git/GitCredentialManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ private async Task<bool> LoadCredentialHelper()
133133
.Configure(processManager)
134134
.StartAwait();
135135

136+
Logger.Trace("Loaded Credential Helper: {0}", credHelper);
137+
136138
if (credHelper != null)
137139
{
138140
return true;

0 commit comments

Comments
 (0)