Ported code from CredMan to GitUpdater