$ git credential-manager version
Git Credential Manager for Windows version 1.14.0
$ git --version
git version 2.16.2.windows.1
When trying to do any git operation I get the following:
$ git pull
fatal: TypeInitializationException encountered.
The type initializer for 'Microsoft.Alm.Cli.Program' threw an exception.
Username for 'https://github.com':
And it doesn't save my username and password.
Well that's scary 'cause the type initializer is fairly trivial: assign constant to property.
internal Program()
{
Title = AssemblyTitle;
}
This has been driving me mad all day, I eventually solved it by reverting my net framework machine.config back to defaults. I had a few changes around min/max threads that I put in a few days ago, maybe the format was wrong and the config couldnt be loaded? Not sure how this broke it but reverting fixed everything. Hope this helps anyone else googling frantically for this error.
<system.Net> instead of <system.net> in machine.config was the culprit here. I guess we have probably read the same article @GDineen ...
Most helpful comment
This has been driving me mad all day, I eventually solved it by reverting my net framework machine.config back to defaults. I had a few changes around min/max threads that I put in a few days ago, maybe the format was wrong and the config couldnt be loaded? Not sure how this broke it but reverting fixed everything. Hope this helps anyone else googling frantically for this error.