Git-Credential-Manager-for-Windows
Git-Credential-Manager-for-Windows copied to clipboard
fatal: AggregateException encountered.One or more errors occurred.
Getting "fatal: AggregateException encountered.One or more errors occurred." after entering the username and password. My git config has credential.helper=manager
The issue seems similar to that of #57
Please let me know how to proceed.
@testcafe12 first, let me apologize for my slow response. I've been offline nursing a fever for the past few days. Now that I'm mostly recovered (yet very behind) I can reply.
I suggest enabling GCM tracing, so we can see exactly where the exception is happening. To do so, run set GCM_TRACE=1 from your console (I am assuming CMD here, the command is different in PowerShell, and Bash). Then reproduce your issue. The data printed ought to be insightful enough to get a root cause.
Thanks!
@whoisj Thanks for the response. Please find the error below:
06:44:52.792620 ...\Program.cs:145 trace: [Die] System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthentication.<InteractiveLogon>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Cli.Program.<>c__DisplayClass95_4.<<QueryCredentials>b__3>d.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthentication.<InteractiveLogon>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Cli.Program.<>c__DisplayClass95_4.<<QueryCredentials>b__3>d.MoveNext()<---
06:44:52.798639 ...\Program.cs:186 trace: [LogEvent] System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthentication.<InteractiveLogon>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Cli.Program.<>c__DisplayClass95_4.<<QueryCredentials>b__3>d.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Authentication.GitHubAuthentication.<InteractiveLogon>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Alm.Cli.Program.<>c__DisplayClass95_4.<<QueryCredentials>b__3>d.MoveNext()<---
06:44:52.814634 ...\Program.cs:163 trace: [Die] fatal: AggregateException encountered.
One or more errors occurred.
fatal: AggregateException encountered.
Thanks.
Which version of the GCM is this? If it is a version pre-TLS 1.2 support, then this error would be expected since GitHub upgraded the minimum TLS support to 1.2.
You clipped off the portion that specified the version info, but the error message The request was aborted: Could not create SSL/TLS secure channel. leads me to believe it is the TLS 1.2 issue.
@whoisj I used these steps and was able to bypass the error, I'm on 2.50.99.19 build of git extensions.
- Navigate to repository folder
- Type: set GDM_TRACE=1
- Do a git command: git push origin
- The system will ask for username or password.
- There will be errors but the command should proceed.
I'm having the same issue. Could it be due to 2FA? I never had to use my 2FA during login. I'm using this via sourcetree by the way.
Had a lot of issues with this one. In the end I managed to fix it slightly. I tried the following steps:
- According to this issue, the problem is that Github updated to TLS 1.2 and older versions don't support this. Therefore I've upgraded to the latest version of Git for Windows. Error:
fatal: AggregateException encountered.One or more errors occurred.
- I also had a proxy configured and without configuring it, I got certificate issues, similar to this issue. Error:
fatal: unable to access '[git_path]':
error setting certificate verify locations:
CAfile: C:\Program Files\Git\mingw64/bin/curl-ca-bundle.crt
CApath: none
- When I configured my proxy and used the Git credential manager, I also got errors. There is a known issue with proxies in the .NET library. You might run into this if you are using the Git credential manager for windows. I've never managed to get my proxy working because of this. Error:
fatal: NotSupportedException encountered.
The ServicePointManager does not support proxies with the https scheme.
- I also had 2FA authentification which made it seem that I had to use this credential manager. However, there is a trick to generate a token. You can subsequently use this token as a password. If I used this token, I could use the old username-password login and bypass the issues with the credential manager. With the old login system, I could correctly set up the proxy and now everything works.
@danielsjf remember, your proxy needs to support TLS1.2 as well. If it doesn't, the stream to GitHub will get interrupted.