Secure Git credential storage for Windows with support for Visual Studio Team Services, GitHub, and Bitbucket multi-factor authentication.

View the Project on GitHub Microsoft/Git-Credential-Manager-for-Windows

Configuration Options

Git Credential Manager and Git Askpass work out of the box for most users. Configuration options are available to customize or tweak behavior(s).

The Git Credential Manager for Windows [GCM] can be configured using Git’s configuration files, and follows all of the same rules Git does when consuming the files. Global configuration settings override system configuration settings, and local configuration settings override global settings; and because the configuration details exist within Git’s configuration files you can use Git’s git config utility to set, unset, and alter the setting values.

The GCM honors several levels of settings, in addition to the standard local > global > system tiering Git uses. Since the GCM is HTTPS based, it’ll also honor URL specific settings. Regardless, all of the GCM’s configuration settings begin with the term credential. Additionally, the GCM respects GCM specific environment variables as well.

Regardless, the GCM will only be used by Git if the GCM is installed and the key/value pair credential.helper manager is present in Git’s configuration.

For example: is more specific than, which is more specific than credential.namespace.

In the examples above, the credential.namespace setting would affect any remote repository; the would affect any remote repository in the domain, and/or any subdomain (including www.) of, ‘’; where as the the setting would only be applied to remote repositories hosted at ‘’.

For the complete list of settings the GCM understands, see the list below.

Configuration Setting Names


Defines the type of authentication to be used.

Supports Auto, Basic, AAD, MSA, GitHub, Bitbucket, Integrated, and NTLM.

Use AAD or MSA if the host is ‘’ Azure Domain or Live Account authentication, relatively.

Use GitHub if the host is ‘’.

Use BitBucket or Atlassian if the host is ‘’.

Use Integrated or NTLM if the host is a Team Foundation, or other NTLM authentication based, server.

Defaults to Auto.

git config --global AAD



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.

git config --global https://myproxy:8080



Specifies if user can be prompted for credentials or not.

Supports Auto, Always, or Never. Defaults to Auto.

git config --global never



Forces authentication to use a modal dialog instead of asking for credentials at the command prompt.

Supports true or false. Defaults to true.

git config --global credential.modalPrompt true



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.

Supports any ASCII, alpha-numeric only value. Defaults to git.

git config --global credential.namespace name



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.

Supports true or false. Defaults to false.

git config --global true



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.

git config --global 100000



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 to AAD or MSA.

git config --global 24



Instructs Git to supply the path portion of the remote URL to credential helpers. When path is supplied, the GCM will use the host-name + path as the key when reading and/or writing credentials.

Note: This option changes the behavior of Git.

Supports true or false. Defaults to false.

git config --global true


Instructs Git to provide user-info to credential helpers. When user-info is supplied, the GCM will use the user-info + host-name as the key when reading and/or writing credentials. See RFC: URI Syntax, User Information for more details.

Note: This option changes the behavior of Git.

Supports any URI legal user-info. Defaults to not providing user-info.

git config --global johndoe


Causes validation of credentials before supplying them to Git. Invalid credentials get a refresh attempt before failing. Incurs minor network operation overhead.

Supports true or false. Defaults to true. Ignored when authority is set to Basic.

git config --global false



Overrides GCM default scope request when generating a Personal Access Token from Azure DevOps. The supported format is one or more scope values separated by whitespace, commas, semi-colons, or pipe '|' characters.

Defaults to vso.code_write|vso.packaging; Honored when host is ‘’.

git config --global vso.code_write|vso.packaging_write|vso.test_write



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 the GCM_TRACE environment variable.

Supports true or false. Defaults to false.

git config --global credential.writeLog true


Sample Configuration

[credential ""]
    authority = AAD
    interactive = never
    preserve = true
    tokenDuration = 12
    validate = false
[credential ""]
    authority = MSA
    helper = manager
    writelog = true