Git-credential-manager-for-windows: The type initializer for 'Microsoft.Alm.Cli.Program' threw an exception

Created on 27 Feb 2018  路  3Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

$ 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.

bug

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.

All 3 comments

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 ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

testcafe12 picture testcafe12  路  7Comments

clairernovotny picture clairernovotny  路  7Comments

panuganti picture panuganti  路  4Comments

eromoe picture eromoe  路  5Comments

ranadeep-sharma picture ranadeep-sharma  路  6Comments