Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fatal: AggregateException encountered" when prompting for username #57

Closed
Sean18 opened this issue Nov 17, 2015 · 92 comments

Comments

Projects
None yet
@Sean18
Copy link

commented Nov 17, 2015

I have been using git commandline with their token as a password. We are using 2fa. I installed this tool, and the first time I use a git command, I see the following.

image

Even though I am prompted again for my username & password, I type it in (not the token) and it does not work.

You can see my .gitconfig has credential.helper=manager. I tried both the installer and the manual install. uninstalled/re-installed many times.

My windows credential manager has no entry, because I have yet to enter my user/password/authcode.

What should I do? Thanks.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2015

Interesting. Can you enable git config credential.writelog true and then run the tool. There should be a log written to .git\credential.log at the root of your repo. Pasting the contents back to this thread will help immensely with my helping your resolve your issue.

@gistofj gistofj added the bug label Nov 20, 2015

@Sean18

This comment has been minimized.

Copy link
Author

commented Nov 23, 2015

I reinstalled the credential manager to try this, but now its not prompting me for anything. I have since installed SourceTree, in which I used my token password. I suspect it has saved the password somehow - though I am not sure of the mechanism.

I enabled the log, but nothing is written there. git pull is working for me now, just not with credential manager. I'll need to figure out how SourceTree is saving the password.

Thanks.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Nov 23, 2015

Thanks for the update.

I'll keep trying to figure out what could be happening. We have an update to the CGM coming out asap, with luck that'll fix the issue, or at least fix the issue of the empty log file.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2015

This code was refactored. It should be more stable now.

I'm going to close this issue under the assumption that the issue is resolved.

Thanks, again, for reporting it.

@gistofj gistofj closed this Nov 25, 2015

@talha131

This comment has been minimized.

Copy link

commented Jan 23, 2016

I am detailing my experience here in order to help others.

I use git command line with github token as password. Git Credential Manager for Windows worked perfectly. But then I started to get Fatal: AggregateException encountered error every time I accessed github repository from command line.

I enabled logs using git config credential.writelog true. Ran a git pull, then checked logs at .git\credential.log.

Log Start (2016-01-23 06:39:02Z)
Microsoft Git Credential Manager for Windows version Git Credential Manager for Windows
Program::Get
   targetUri = https://github.com/
Program::CreateAuthentication
   detecting authority type
   authority it GitHub
Fatal: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'api.github.com'
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.GithubAuthority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.GithubAuthentication.<ValidateCredentials>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass38_1.<<Get>b__2>d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.Alm.CredentialHelper.Program.Get()
   at Microsoft.Alm.CredentialHelper.Program.Main(String[] args)
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'api.github.com'
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.GithubAuthority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.GithubAuthentication.<ValidateCredentials>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass38_1.<<Get>b__2>d.MoveNext()<---

I noticed

The remote name could not be resolved: 'api.github.com'

Tried to ping the address and got couldn't resolve host error. I added 8.8.8.8 and 8.8.4.4 to my DNS list, and this solved the issue.

@halt-avmc

This comment has been minimized.

Copy link

commented Jul 29, 2016

I have same error. Here is my credential.log:

Log Start (2016-07-29 06:47:19Z)
Microsoft Git Credential Manager for Windows version 1.5.0
Program::Get
   targetUri = https://github.com/
Program::CreateAuthentication
   detecting authority type
   authority it GitHub
Program::GitHubCredentialModalPrompt
   prompting user for credentials.
Fatal: System.AggregateException: Произошла одна или несколько ошибок. ---> System.AggregateException: Произошла одна или несколько ошибок. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Базовое соединение закрыто: Непредвиденная ошибка при передаче. ---> System.IO.IOException: Сбой установки соединения из-за неожиданного формата пакета.
   в System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   в System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   в Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
   --- Конец трассировки внутреннего стека исключений ---
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   в System.Threading.Tasks.Task`1.get_Result()
   в Microsoft.Alm.Authentication.GitHubAuthentication.InteractiveLogon(TargetUri targetUri, Credential& credentials)
   в Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass45_1.<<Get>b__2>d.MoveNext()
   --- Конец трассировки внутреннего стека исключений ---
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в Microsoft.Alm.CredentialHelper.Program.Get()
   в Microsoft.Alm.CredentialHelper.Program.Main(String[] args)
---> (Внутреннее исключение #0) System.AggregateException: Произошла одна или несколько ошибок. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Базовое соединение закрыто: Непредвиденная ошибка при передаче. ---> System.IO.IOException: Сбой установки соединения из-за неожиданного формата пакета.
   в System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   в System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   в Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()
   --- Конец трассировки внутреннего стека исключений ---
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   в System.Threading.Tasks.Task`1.get_Result()
   в Microsoft.Alm.Authentication.GitHubAuthentication.InteractiveLogon(TargetUri targetUri, Credential& credentials)
   в Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass45_1.<<Get>b__2>d.MoveNext()
---> (Внутреннее исключение #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Базовое соединение закрыто: Непредвиденная ошибка при передаче. ---> System.IO.IOException: Сбой установки соединения из-за неожиданного формата пакета.
   в System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
   в System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   в System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- Конец трассировки внутреннего стека исключений ---
   в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   в Microsoft.Alm.Authentication.GitHubAuthority.<AcquireToken>d__5.MoveNext()<---
<---



Log Start (2016-07-29 06:47:43Z)
Microsoft Git Credential Manager for Windows version 1.5.0
Program::Erase
   targetUri = https://github.com/
Program::CreateAuthentication
   detecting authority type
   authority it GitHub
   deleting GitHub credentials

I guess it is because of this:
System.IO.IOException: Сбой установки соединения из-за неожиданного формата пакета.
Translation (I have a russian Windows with errors in russian):
System.IO.IOException: Connection failure due to unexpected packet format.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2016

Oh dear! @haacked any chance you, or another Githubber, can assist with this issue.

I am not a "packet format" specialist and this issue is reported directly against github.com.

@gistofj gistofj reopened this Jul 29, 2016

@haacked

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2016

Does this problem happen all the time or is it intermittent? Are you behind a proxy? This seems to be related to SSL, but I'm not aware of any problems on GitHub.com's side.

@halt-avmc

This comment has been minimized.

Copy link

commented Jul 31, 2016

For now problem happen all the time.
Well, may be I am behind a proxy. I explain why "may be".
I am a corporate Windows 7 user with enabled "auto proxy configuration" via AD Group Policies ("Automatically detect settings" check box under system's Internet Properties is set). And we have McAffe proxy, which is in fact selected by Internet Explorer by default. But I have a direct Internet connection also.
So I'll check out with that checkbox switched off if the problem will dissapear.

@halt-avmc

This comment has been minimized.

Copy link

commented Aug 1, 2016

I recently checked 'git push' with "Automatic proxy discovery" checkbox disabled and it worked flawlessly.

@gistofj gistofj closed this Aug 9, 2016

@majkinetor

This comment has been minimized.

Copy link

commented Nov 30, 2016

I have the same problem behind the proxy, it started to happen during last week. Nothing changed in my configuration and it worked before with the same setup for months.

It happesn in GUI and console and is related to proxy. Relevant line from the log:

10:16:44.406141 ...\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 remote name could not be resolved: 'api.github.com'

Thsi si my proxy setup (using proxy functions from this PowerShell module)

PS> proxyc
$Env:ftp_proxy   = 'http://10.35.9.55:8080'
$Env:http_proxy  = 'http://10.35.9.55:8080'
$Env:https_proxy = 'http://10.35.9.55:8080'
$Env:no_proxy    = '*10.*'

PS > proxy
Override              Server          Enable
--------              ------          ------
10.*                  10.35.9.55:8080      1

Problem happens all the time with tortoisegit and git.exe with the difference that sometimes prompt returns ASAP and sometimes I wait 10 or so seconds x 2 (two aggregation messages appear).

Here is the console output

13 [ M:0 D:0 A:0 ?:1 ]  16-11-30 10.23.12  C:\work\_chocolatey\chocolatey-coreteampackages\automatic
## virtualbox~> git push origin virtualbox
fatal: AggregateException encountered.
   One or more errors occurred.
fatal: AggregateException encountered.
   One or more errors occurred.
Username for 'https://github.com': majkinetor
Password for 'https://majkinetor@github.com':
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 2.61 KiB | 0 bytes/s, done.
Total 7 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/chocolatey/chocolatey-coreteampackages.git
   409982f..8d3e8e0  virtualbox -> virtualbox
-------------------------------------------------------------------
14 [ M:0 D:0 A:0 ?:1 ]  16-11-30 10.30.45  C:\work\_chocolatey\chocolatey-coreteampackages\automatic

Notice the time - command started at 10:23, finished at 10:45, almost all of it was waiting.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2016

@majkinetor it sounds like your proxy setup is something that the NetFx system doesn't expect, and since the GCM relies on the NetFx WebProxy class to "do the right thing(tm)", the GCM is not expecting your setup either.

Which proxy are you using, how is it configured, and is there a knob we could add to the GCM to help you align its expectations with your setup?

@majkinetor

This comment has been minimized.

Copy link

commented Nov 30, 2016

There is nothing special about my setup. We use squid/3.1.10 and other tools work correctly (chocolatey, normal net clients etc.) For linux tools I have to use env vars as shown (git, gem, pip etc.) and there is nothing speecial about that either - if I remove them nothing changes.

I do not have git proxy set, however, I rely on http_proxy linux vars for that. Maybe that is the root of the problem (although it worked before).

@majkinetor

This comment has been minimized.

Copy link

commented Nov 30, 2016

IMO, the tool should do the following to set correct proxy:

  • Try git proxy settings first
  • Try IE proxy settings next
  • Try linux env vars finally
@gistofj

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2016

@majkinetor sounds great, any chance you've got bandwidth to cook up a contribution? 😃

@majkinetor

This comment has been minimized.

Copy link

commented Nov 30, 2016

Not at this moment, sorry, I am here only to report the bug. I have too many other FOS projects I am working on ATM. I am not telling you what to do, just telling you what I think should be done based on my experience with this.

@grigory-rechistov

This comment has been minimized.

Copy link

commented Dec 21, 2016

I can confirm that this bug happens when I am behind a HTTP proxy and attempt to push to Github. Credentials user interface fails with Fatal: AggregateException encountered.

@majkinetor

This comment has been minimized.

Copy link

commented Dec 21, 2016

On my sistem I have to also wait for minutes to pass and then regular git usr/password prompts appear.
This makes me frequently forget about them in the background.

I use this in my Powershell profile:

# Ask for password in GUI (easier to see and automate)
#https://marcus.handte.org/2011/09/07/enabling-interactive-prompts-in-cygwins-git-port/
$sshaskpass_path = 'C:\Program Files\TortoiseGit\bin\sshaskpass.exe'
if (Test-Path $sshaskpass_path) { $ENV:GIT_ASKPASS  = $sshaskpass_path } else { Write-Warning 'Git profile: sshaskpass not found' }
rm Variable:/sshaskpass_path

Unfortunatelly, AutoHotkey doesn't want to send keys to sshaskpass for some reason but its still valueable as it will prompt in the GUI. HTH somebody until this is fixed.

@majkinetor

This comment has been minimized.

Copy link

commented Dec 21, 2016

It actually works, here is the working AHK code that people can use instead of Git-Credential-Manager until this is fixed.

You need to set your git username and pass in the script now. Its easy to modify it to use CredentialManger tho and ask for pass/username first time.

@jrob

This comment has been minimized.

Copy link

commented Jan 27, 2017

I am getting the same issue. The only thing I can come up with is that it is trying to open a socket connection over 443 instead of an https connection over 443 and our proxy denies it. If I open a web browser and go to http://192.30.253.116:443 I get gateway time out. If I go to https://192.30.253.116 chrome complains about the cert name mismatch but the connection makes it. I believe there is still an issue and this should probably be reopened or pushed into another ticket.

YYYY.01.27 11:11:49 Microsoft Git Credential Manager for Windows version 1.8.1
11:11:49.316970 ...\Program.cs:367      trace: [CreateAuthentication] detecting authority type for 'https://github.com/'.
11:11:49.319452 ...uthentication.cs:126 trace: [GetAuthentication] created GitHub authentication for 'https://github.com/'.
11:11:49.319452 ...\Program.cs:426      trace: [CreateAuthentication] authority for 'https://github.com/' is GitHub.
11:11:49.386534 ...icationPrompts.cs:20 trace: [CredentialModalPrompt] prompting user for credentials for 'https://github.com/'.
11:11:58.485262 ...\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: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.30.253.116:443
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   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: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.30.253.116:443
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass95_4.<<QueryCredentials>b__3>d.MoveNext()<---
@gistofj

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2017

@jrob can you disable credential validation?

Easiest method would be SET GCM_VALIDATE=false then try Git again in the same console.

@maets

This comment has been minimized.

Copy link

commented Apr 4, 2017

I got this problem when my machine.config was corrupt on a windows env. Fixing the config fixed the issue.

@majkinetor

This comment has been minimized.

Copy link

commented Apr 4, 2017

Easiest method would be SET GCM_VALIDATE=false then try Git again in the same console.

Works for my case. Thx.

@vijaymca

This comment has been minimized.

Copy link

commented Oct 17, 2017

Where should i execute this ,.. please help me. I am getting same error

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Oct 20, 2017

@vijaymca open a Command Prompt

  1. Run SET GCM_VALIDATE=false
  2. Run git ... command
@KerryJones

This comment has been minimized.

Copy link

commented Feb 8, 2018

@whoisj I get "SET command not found"

@sashberd

This comment has been minimized.

Copy link

commented Feb 25, 2018

The solution works!!!!!!!!

@mark-richardson-finsuite

This comment has been minimized.

Copy link

commented Feb 25, 2018

@whoisj, I disagree. I could not fetch or push without reentering my credentials.

@vsaldanya

This comment has been minimized.

Copy link

commented Feb 26, 2018

Only updating git bash it goes!! Thanks!!

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2018

I disagree. I could not fetch or push without reentering my credentials.

Public or private repository? I'm see the initial request go through when fetching from the GCM repository. There's never a 401 challenge, and therefore git-credential is never engaged. I'd be curious if you were seeing something different.

@mark-richardson-finsuite

This comment has been minimized.

Copy link

commented Feb 26, 2018

I disagree. I could not fetch or push without reentering my credentials.

Public or private repository? I'm see the initial request go through when fetching from the GCM repository. There's never a 401 challenge, and therefore git-credential is never engaged. I'd be curious if you were seeing something different.

Private repo.

@AnupamChowdhury

This comment has been minimized.

Copy link

commented Feb 27, 2018

I was also facing same problem, after re-installing git with latest version 2.16.2 it asked for 2FA and now the error is gone.

@tcgriffith

This comment has been minimized.

Copy link

commented Feb 27, 2018

Same problem here, reinstalled git 2.16.2 solved it.

So...
breaking something intentionally so people have to get the latest upgrades? nice move.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2018

Private repo.

Well yea, there you go.

vast majority of GitHub hosted repositories

That "vast majority" are public. 😏 Regardless, glad to hear that you're unblocked.

@dscho

This comment has been minimized.

Copy link
Collaborator

commented Feb 27, 2018

breaking something intentionally so people have to get the latest upgrades?

That is not what happened. Please do not misrepresent it. We are all hard at work here to make Git, GitHub and Git Credential Manager work as well as we can.

What happened is that some of the older cryptographic algorithms are no longer safe. Some of them have been "broken" in the cryptographic sense (attacks have been demonstrated that are more feasible than they should be, and it is to be expected that these attacks soon become practical). GitHub announced already last year (although I have to admit that I, like you, had missed this back then) that support for these weak algorithms would be switched off, to protect users. Git for Windows/Git Credential Manager was prepared to accommodate that change, unfortunately only relatively late. And yes, you only get those fixes if you update.

So the assumption that we broke anything to force you to update is incorrect. Instead, we worked hard to make this as painless as we could (although admittedly, I had hoped for a smoother ride).

@tcgriffith

This comment has been minimized.

Copy link

commented Feb 28, 2018

@dscho
Thanks for the explanation! Sorry for being salty in the last comment, have a nice day!

@rasik210

This comment has been minimized.

Copy link

commented Feb 28, 2018

Initially, I was thinking something has gone wrong as I was making a github commit after a gap of a few days but when I faced the same issue on both my home and office PC then I realized that something is indeed wrong. Thank you everyone for helping.

@jdriviere

This comment has been minimized.

Copy link

commented Feb 28, 2018

@dscho Thank you for explaining what happened. :)

@LouisWayne

This comment has been minimized.

Copy link

commented Mar 25, 2018

Installed the latest git v2.16.2 and now it is fine haha

@lizzyhuang

This comment has been minimized.

Copy link

commented May 16, 2018

I use the git push with RStudio. It worked nicely before this March. Now I've run into this issue, my first time. I don't use command line and am on Windows 10. So this has been a headache for me. Every time I push things, it will show this error, the will ask me for Username and password. Then says "username or password" incorrect, even though I'm sure I use the right user name and correct password. I don't know how to solve it. It seems that has something to do with GitHub Windows desktop?

@ctolkien

This comment has been minimized.

Copy link

commented May 16, 2018

I don't know how to solve it.

The information is in this thread. You need to upgrade your version of Git.

@amalatesta

This comment has been minimized.

Copy link

commented Jun 19, 2018

Hi, I have the same problem, when start in my window bash (windows 7) I get the same error:

$ git pull
fatal: TaskCanceledException encountered.
Se cancel▒ una tarea.
Already up to date.

But, when i try in the same window for second time it work
$ git pull
Already up to date.

$ git credential-manager version
Git Credential Manager for Windows version 1.16.1
$ git --version
git version 2.17.1.windows.2

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2018

@amalatesta that sounds like a transient network problem, could it be?

@ahmetertem

This comment has been minimized.

Copy link

commented Jun 29, 2018

I had same issue and updated git as @ctolkien said. It's okay now.

Thanks

@psw58

This comment has been minimized.

Copy link

commented Jul 19, 2018

I had same issue when I would push to GITHUB the windows credential center would open and ask for Git Login. All Login attempts failed. The problem was solved after updating Git for windows. Then after pushing to GitHub the GitHub login
image opened, and I was able to login to Github, and push changes.

@gistofj

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2018

opened git login instead of windows credential manager.

What does this even mean? I'm sorry, I'm not grokking your statement.

@HEHenson

This comment has been minimized.

Copy link

commented Aug 3, 2018

I found that updating my git on the local machine fixed the issue

@petethacker

This comment has been minimized.

Copy link

commented Oct 25, 2018

i was getting this issue when doing anything, even cloning.

using windows i was on git version git v2.17.1.2. after i updated to version v2.19.1 the problem went away.

@biserd

This comment has been minimized.

Copy link

commented Jan 7, 2019

Having the same error fatal: AggregateException encountered. when connecting VS Code to Git it was resolved by updating Git Credential Manager for Windows to the latest v1.18.3. Hope it helps.

@ManuchekhrT

This comment has been minimized.

Copy link

commented Feb 15, 2019

i updated git version, but still doesn't working, could anybody help?

@jeschu1 jeschu1 added the github label Feb 15, 2019

@br4nnigan

This comment has been minimized.

Copy link

commented Feb 19, 2019

update from 2.12 to 2.20 fixed it for me (wasn't behind a proxy)

@ghost

This comment has been minimized.

Copy link

commented Mar 18, 2019

I have been getting "Fatal: AggregateException encountered." when I try to push.
Then I did below but same issue again.
git status still says my local is 4 commits ahead.

SET GCM_VALIDATE=false

credential.log

Log Start (2019-03-18 11:27:20Z)
Microsoft Git Credential Manager for Windows version 1.3.0
Program::Get
targetUri = https://github.com/
Program::CreateAuthentication
detecting authority type
authority it GitHub
Program::GithubCredentialModalPrompt
Program::ModalPromptForCredemtials
Program::ModalPromptForCredemtials
Program::ModalPromptDisplayDialog
successfully acquired credentials from user.
Fatal: System.AggregateException: One or more errors occurred. ---> 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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Alm.Authentication.GithubAuthority.d__5.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at Microsoft.Alm.Authentication.GithubAuthentication.InteractiveLogon(TargetUri targetUri, Credential& credentials)
at Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass45_1.<b__2>d.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.Alm.CredentialHelper.Program.Get()
at Microsoft.Alm.CredentialHelper.Program.Main(String[] args)
---> (Inner Exception #0) 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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Alm.Authentication.GithubAuthority.d__5.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at Microsoft.Alm.Authentication.GithubAuthentication.InteractiveLogon(TargetUri targetUri, Credential& credentials)
at Microsoft.Alm.CredentialHelper.Program.<>c__DisplayClass45_1.<b__2>d.MoveNext()
---> (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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Alm.Authentication.GithubAuthority.d__5.MoveNext()<---
<---

@ghost

This comment has been minimized.

Copy link

commented Mar 18, 2019

Downloading and installing 2.21 version now.

@arbingordon

This comment has been minimized.

Copy link

commented Mar 24, 2019

Updating to 2.21 fixed it here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.