Secure Git credential storage for Windows with support for Visual Studio Team Services, GitHub, and Bitbucket multi-factor authentication.
View the Project on GitHubmicrosoft/Git-Credential-Manager-for-Windows
Git Credential Manager andGit Askpass work out of the box for most users.Environment variables, to customize or tweak behavior, are available as needed.
The Git Credential Manager for Windows [GCM] can be configured usingenvironment variables. Environment variables take precedence overconfiguration settings.
For the complete list of environment variables the GCM understands, see the list below.
Defines the type of authentication to be used.
SupportsAuto,Basic,AAD,MSA,GitHub,Bitbucket,Integrated, andNTLM.
UseAAD orMSA if the host is ‘visualstudio.com’ Azure Domain or Live Account authentication, relatively.
UseGitHub if the host is ‘github.com’.
UseBitBucket orAtlassian if the host is ‘bitbucket.org’.
UseIntegrated orNTLM if the host is a Team Foundation, or other NTLM authentication based, server.
Defaults toAuto.
Determines if the the GCM should ignore Git local configuration values.
Supportstrue orfalse. Defaults tofalse.
No configuration equivalent.
Determines if the the GCM should ignore Git system configuration values.
Supportstrue orfalse. Defaults tofalse.
No configuration equivalent.
Causes the proxy value to be considered when evaluating credential target information.A proxy setting should established if use of a proxy is required to interact with Git remotes.
The value should the URL of the proxy server.
Defaults to not using a proxy server.
Sets the reporteduser-agent when GCM performs network operations.
Defaults to the GCM’s user-agent.
No configuration equivalent.
Specifies if user can be prompted for credentials or not.
SupportsAuto,Always, orNever. Defaults toAuto.
Forces authentication to use a modal dialog instead of asking for credentials at the command prompt.
Supportstrue orfalse. Defaults totrue.
Sets the namespace for stored credentials.
By default the GCM uses the ‘git’ namespace for all stored credentials, setting this configuration value allows for control of the namespace used globally, or per host.
Prevents the deletion of credentials even when they are reported as invalid by Git.Can lead to lockout situations once credentials expire and until those credentials are manually removed.
Supportstrue orfalse. Defaults tofalse.
Sets the maximum time, in milliseconds, for a network request to wait before timing out. This allows changing the default for slow connections.
Supports an integer value. Defaults to 90,000 miliseconds.
Sets a duration, in hours, limit for the validity of Personal Access Tokens requested from Azure DevOps.
If the value is greater than the maximum duration set for the account, the account value supersedes. The value cannot be less than a one hour (1).
Defaults to the account token duration. Honored when authority is set toAAD orMSA.
Enables trace logging of all activities.Configuring Git and the GCM to trace to the same location is often desirable, and the GCM is compatible and cooperative withGIT_TRACE.
Example:
SET GIT_TRACE=%UserProfile%\git.logSET GCM_TRACE=%UserProfile%\git.logIf the value ofGCM_TRACE is a full path to a file in an existing directory, logs are appended to the file.
IF the value ofGCM_TRACE istrue, logs are written standard error.
Defaults tracing being disabled.
No configuration equivalent.
Causes validation of credentials before supplying them to Git.Invalid credentials get a refresh attempt before failing.Incurs minor network operation overhead.
Defaults totrue. Ignored when authority set toBasic.
Overrides GCM default scope request when generating a Personal Access Token from Azure DevOps.The supported format is one or morescope values separated by whitespace, commas, semi-colons, or pipe characters (' ',',',';','|').
Defaults tovso.code_write|vso.packaging; Honored when host is ‘visualstudio.com’.
Enables trace logging of all activities.Logs are written to the local .git/ folder at the root of the repository.
Note: This setting will not override theGCM_TRACE environment variable.