Git Credential Manager Core work out of the box for most users. Configuration options are available to customize or tweak behavior.
Git Credential Manager Core (GCM Core) can be configured using environment variables. Environment variables take precedence over configuration options.
For the complete list of environment variables GCM Core understands, see the list below.
Enables trace logging of all activities.
Configuring Git and GCM to trace to the same location is often desirable, and GCM is compatible and cooperative with GIT_TRACE.
SET GIT_TRACE=%UserProfile%\git.log
SET GCM_TRACE=%UserProfile%\git.logexport GIT_TRACE=$HOME/git.log
export GCM_TRACE=$HOME/git.logIf the value of GCM_TRACE is a full path to a file in an existing directory, logs are appended to the file.
If the value of GCM_TRACE is true or 1, logs are written to standard error.
Defaults to tracing disabled.
No configuration equivalent.
Enables tracing of secret and senstive information, which is by default masked in trace output.
Requires that GCM_TRACE is also enabled.
SET GCM_TRACE=%UserProfile%\gcm.log
SET GCM_TRACE_SECRETS=1export GCM_TRACE=$HOME/gcm.log
export GCM_TRACE_SECRETS=1If the value of GCM_TRACE_SECRETS is true or 1, trace logs will include secret information.
Defaults to disabled.
No configuration equivalent.
Enables inclusion of Microsoft Authentication libraries (ADAL, MSAL) logs in GCM trace output.
Requires that GCM_TRACE is also enabled.
SET GCM_TRACE=%UserProfile%\gcm.log
SET GCM_TRACE_MSAUTH=1export GCM_TRACE=$HOME/gcm.log
export GCM_TRACE_MSAUTH=1If the value of GCM_TRACE_MSAUTH is true or 1, trace logs will include verbose ADAL/MSAL logs.
Defaults to disabled.
No configuration equivalent.
Pauses execution of GCM Core at launch to wait for a debugger to be attached.
SET GCM_DEBUG=1export GCM_DEBUG=1Defaults to disabled.
No configuration equivalent.
Permit or disable GCM Core from interacting with the user (showing GUI or TTY prompts). If interaction is required but has been disabled, an error is returned.
This can be helpful when using GCM Core in headless and unattended environments, such as build servers, where it would be preferable to fail than to hang indefinately waiting for a non-existent user.
To disable interactivity set this to false or 0.
In previous versions of GCM this setting had a different behavior and accepted other values.
The following table summarizes the change in behavior and the mapping of older values such as never:
| Value(s) | Old meaning | New meaning |
|---|---|---|
auto |
Prompt if required – use cached credentials if possible | (unchanged) |
never,false |
Never prompt – fail if interaction is required | (unchanged) |
always,force,true |
Always prompt – don't use cached credentials | Prompt if required (same as the old auto value) |
SET GCM_INTERACTIVE=0export GCM_INTERACTIVE=0Defaults to enabled.
Also see: credential.interactive
Define the host provider to use when authenticating.
| ID | Provider |
|---|---|
auto (default) |
[automatic] |
azure-repos |
Azure Repos |
github |
GitHub |
generic |
Generic (any other provider not listed above) |
Automatic provider selection is based on the remote URL.
This setting is typically used with a scoped URL to map a particular set of remote URLs to providers, for example to mark a host as a GitHub Enterprise instance.
SET GCM_PROVIDER=githubexport GCM_PROVIDER=githubAlso see: credential.provider
This setting is deprecated and should be replaced by
GCM_PROVIDERwith the corresponding provider ID value.Click here for more information.
Select the host provider to use when authenticating by which authority is supported by the providers.
| Authority | Provider(s) |
|---|---|
auto (default) |
[automatic] |
msa, microsoft, microsoftaccount,aad, azure, azuredirectory,live, liveconnect, liveid |
Azure Repos (supports Microsoft Authentication) |
github |
GitHub (supports GitHub Authentication) |
basic, integrated, windows, kerberos, ntlm,tfs, sso |
Generic (supports Basic and Windows Integrated Authentication) |
SET GCM_AUTHORITY=githubexport GCM_AUTHORITY=githubAlso see: credential.authority
Allow detection of Windows Integrated Authentication (WIA) support for generic host providers. Setting this value to false will prevent the use of WIA and force a basic authentication prompt when using the Generic host provider.
Note: WIA is only supported on Windows.
Note: WIA is an umbrella term for NTLM and Kerberos (and Negotiate).
| Value | WIA detection |
|---|---|
true, 1, yes, on (default) |
Permitted |
false, 0, no, off |
Not permitted |
SET GCM_ALLOW_WINDOWSAUTH=0export GCM_ALLOW_WINDOWSAUTH=0Also see: credential.allowWindowsAuth
This setting is deprecated and should be replaced by the standard
http.proxyGit configuration option.Click here for more information.
Configure GCM Core to use the a proxy for network operations.
Note: Git itself does not respect this setting; this affects GCM only.
SET GCM_HTTP_PROXY=http://john.doe:password@proxy.contoso.comexport GCM_HTTP_PROXY=http://john.doe:password@proxy.contoso.comAlso see: credential.httpProxy
Override the available authentication modes presented during GitHub authentication. If this option is not set, then the available authentication modes will be automatically detected.
Note: This setting supports multiple values separated by spaces.
| Value | Authentication Mode |
|---|---|
| (unset) | Automatically detect modes |
oauth |
OAuth-based authentication |
basic |
Basic/PAT-based authentication |
SET GCM_GITHUB_AUTHMODES="oauth basic"export GCM_GITHUB_AUTHMODES="oauth basic"Also see: credential.gitHubAuthModes