git-credential-manager

git-ecosystem活跃维护

跨平台的 Git 凭据管理器,帮你安全保存 Git 密码和令牌,并统一处理 GitHub、Azure Repos、GitLab 等托管平台的登录认证。

Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.

v3.0.2发布于 2026-10-26 11:48 UTC9,438star +7 / 7 天2,972fork同步于 2026-11-10 05:30 UTC

怎么上手

由 README 提炼,执行前请确认
见 docs/install.md 按操作系统选择安装方式
硬件要求按 README 说明

README 未说明显存或 GPU 要求;运行于 Windows 10+、macOS 14+ 及 .NET 官方支持的 Linux 发行版,支持 x64、ARM64,Linux 另支持 ARM32。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 .NET 的跨平台 Git 凭据助手,为各大代码托管平台提供带多因素认证的安全登录

跨平台的 Git 凭据管理器,帮你安全保存 Git 密码和令牌,并统一处理 GitHub、Azure Repos、GitLab 等托管平台的登录认证。

核心能力

  • 由 Git 隐式调用,推送时自动弹出登录窗口
  • 支持 Azure DevOps、GitHub/GHES、Bitbucket、GitLab 认证
  • 使用平台原生安全凭据存储保存令牌
  • 支持 Entra 认证与 broker 支持
  • 支持网络代理与通用 OAuth、Basic HTTP 认证

容易踩的坑

仅支持 HTTP(S) 远程,SSH 需自行按托管平台文档配置;不支持 Git 1.x,Git 2.26.2 存在配置解析兼容问题;GCM 由 Git 隐式调用,不应直接手动执行。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.0.2
  1. v3.0.2GCM 3.0.2最新正式版2026-10-26 · 2026-10-26 11:48 UTC

    Git Credential Manager 3.0 brings native ahead-of-time compilation, Microsoft authentication broker support across Windows, macOS, and Linux, and a refreshed terminal experience.

    Security Fixes:

    [!NOTE] Analysis of GCM shows that Brotli HTTP compression is not enabled by default across any version, so there is no real-world impact.

    Changes since 3.0.1

    • Dependency updates (#2483)
    • Documentation updates for AI agents (#2469)
    • Official release pipeline signing fixes, and update to use the new Mac pool (#2467, #2468)
    • Fix for Linux SecretService credential MIME type (#2475)
    • Allow headless use of Linux SecretService (#2474)

    Changelog: [v3.0.1...v3.0.2][point2-changelog]

    Changes since 3.0.0

    • (Bug fix) Prompt for default OS account on Microsoft DevBox (#2459)
    • (Bug fix) Restore Entra broker parent window handling (#2464)
    • (Feature) Support authtype Git capability (#2457)
    • (Feature) Add console parent window parenting for non-Entra UI (#2465)
    • Drop Windows x86 release binaries (#2456)

    Changelog: [v3.0.0...v3.0.1][point1-changelog]

    Changes since 2.9.1

    [!IMPORTANT] This release changes supported operating systems and the default Azure Repos authentication experience. Review the breaking changes before upgrading.

    Breaking changes and upgrade notes

    Updated platform and .NET requirements

    GCM now targets .NET 10 on all platforms. Windows builds no longer use .NET Framework.

    Platform or installation methodRequirement
    WindowsWindows 10 or later; Windows Server 2016 or later
    macOSmacOS 14 or later
    LinuxA distribution supported by .NET 10
    .NET toolInstall the .NET 10 SDK before installing or updating GCM

    See the [supported environments][supported-environments] and [.NET 10 support matrix][dotnet-support] for details. Standalone platform packages do not require a separate .NET installation.

    Windows 7 and Windows 8.x are no longer supported by GCM 3.x. GCM 2.9.x will receive minimal, security-only maintenance for those systems, but no new features. Upgrading Windows is recommended. ([git-ecosystem/git-credential-manager#2365][pr-2365], [git-ecosystem/git-credential-manager#2367][pr-2367])

    Azure Repos uses OAuth tokens by default

    GCM now returns Microsoft identity OAuth tokens, rather than creating personal access tokens (PATs), by default for Azure Repos. OAuth tokens are automatically refreshed as needed.

    Explicit credential-type settings are still respected. If you need the previous PAT behavior, set:

    git config --global credential.azreposCredentialType pat
    

    The equivalent environment variable is GCM_AZREPOS_CREDENTIALTYPE=pat. See [Azure Repos users and tokens][azrepos-tokens]. ([git-ecosystem/git-credential-manager#2449][pr-2449])

    Microsoft authentication uses the OS broker by default

    Broker integration is now enabled by default wherever supported, rather than requiring an opt-in. This applies to Microsoft authentication, such as Azure Repos; it does not change authentication for GitHub, Bitbucket, or GitLab.

    On macOS, broker authentication requires Company Portal and device enrollment. On Linux, it requires the supported Intune setup, a GNOME desktop, and Microsoft Edge; headless and WSL environments do not support the Linux broker.

    [!WARNING] Depending on your organization's policies, broker sign-in can prompt you to join or enroll your device. On Windows, signing in with a personal Microsoft account can also affect the account linked to your local Windows user. Review the [broker documentation][broker] before proceeding, especially on personal devices.

    To opt out:

    git config --global credential.msauthUseBrok
    
  2. v3.0.1GCM 3.0.12026-10-06 · 2026-10-06 12:18 UTC
    查看更新说明

    Git Credential Manager 3.0 brings native ahead-of-time compilation, Microsoft authentication broker support across Windows, macOS, and Linux, and a refreshed terminal experience.

    Changes since 3.0.0

    • (Bug fix) Prompt for default OS account on Microsoft DevBox (#2459)
    • (Bug fix) Restore Entra broker parent window handling (#2464)
    • (Feature) Support authtype Git capability (#2457)
    • (Feature) Add console parent window parenting for non-Entra UI (#2465)
    • Drop Windows x86 release binaries (#2456)

    Changelog: [v3.0.0...v3.0.1][point1-changelog]

    Changes since 2.9.1

    [!IMPORTANT] This release changes supported operating systems and the default Azure Repos authentication experience. Review the breaking changes before upgrading.

    Breaking changes and upgrade notes

    Updated platform and .NET requirements

    GCM now targets .NET 10 on all platforms. Windows builds no longer use .NET Framework.

    Platform or installation methodRequirement
    WindowsWindows 10 or later; Windows Server 2016 or later
    macOSmacOS 14 or later
    LinuxA distribution supported by .NET 10
    .NET toolInstall the .NET 10 SDK before installing or updating GCM

    See the [supported environments][supported-environments] and [.NET 10 support matrix][dotnet-support] for details. Standalone platform packages do not require a separate .NET installation.

    Windows 7 and Windows 8.x are no longer supported by GCM 3.x. GCM 2.9.x will receive minimal, security-only maintenance for those systems, but no new features. Upgrading Windows is recommended. ([git-ecosystem/git-credential-manager#2365][pr-2365], [git-ecosystem/git-credential-manager#2367][pr-2367])

    Azure Repos uses OAuth tokens by default

    GCM now returns Microsoft identity OAuth tokens, rather than creating personal access tokens (PATs), by default for Azure Repos. OAuth tokens are automatically refreshed as needed.

    Explicit credential-type settings are still respected. If you need the previous PAT behavior, set:

    git config --global credential.azreposCredentialType pat
    

    The equivalent environment variable is GCM_AZREPOS_CREDENTIALTYPE=pat. See [Azure Repos users and tokens][azrepos-tokens]. ([git-ecosystem/git-credential-manager#2449][pr-2449])

    Microsoft authentication uses the OS broker by default

    Broker integration is now enabled by default wherever supported, rather than requiring an opt-in. This applies to Microsoft authentication, such as Azure Repos; it does not change authentication for GitHub, Bitbucket, or GitLab.

    On macOS, broker authentication requires Company Portal and device enrollment. On Linux, it requires the supported Intune setup, a GNOME desktop, and Microsoft Edge; headless and WSL environments do not support the Linux broker.

    [!WARNING] Depending on your organization's policies, broker sign-in can prompt you to join or enroll your device. On Windows, signing in with a personal Microsoft account can also affect the account linked to your local Windows user. Review the [broker documentation][broker] before proceeding, especially on personal devices.

    To opt out:

    git config --global credential.msauthUseBroker false
    

    The equivalent environment variable is GCM_MSAUTH_USEBROKER=false. When the broker is in use, it takes precedence over credential.msauthFlow. ([git-ecosystem/git-credential-manager#2449][pr-2449])

    Azure Repos uses a dedicated GCM Entra application

    GCM now signs in using its own first-party Microsoft Entra application instead of the Visual Studio application. This enables broker support on macOS and Linux, in addition to Windows.

    If you encounter a client-application configuration error, GCM provides guidance for retrying with the legacy application; it does not silently switch back. For a one-command compatibility retry:

    git -c credential.azreposUseLegac
    
  3. v3.0.0GCM 3.0.0pre-release2026-09-24 · 2026-09-24 10:43 UTC
    查看更新说明

    Git Credential Manager 3.0 brings native ahead-of-time compilation, Microsoft authentication broker support across Windows, macOS, and Linux, and a refreshed terminal experience.

    These notes cover changes since GCM 2.9.1.

    [!IMPORTANT] This release changes supported operating systems and the default Azure Repos authentication experience. Review the breaking changes before upgrading.

    Breaking changes and upgrade notes

    Updated platform and .NET requirements

    GCM now targets .NET 10 on all platforms. Windows builds no longer use .NET Framework.

    Platform or installation methodRequirement
    WindowsWindows 10 or later; Windows Server 2016 or later
    macOSmacOS 14 or later
    LinuxA distribution supported by .NET 10
    .NET toolInstall the .NET 10 SDK before installing or updating GCM

    See the [supported environments][supported-environments] and [.NET 10 support matrix][dotnet-support] for details. Standalone platform packages do not require a separate .NET installation.

    Windows 7 and Windows 8.x are no longer supported by GCM 3.x. GCM 2.9.x will receive minimal, security-only maintenance for those systems, but no new features. Upgrading Windows is recommended. ([git-ecosystem/git-credential-manager#2365][pr-2365], [git-ecosystem/git-credential-manager#2367][pr-2367])

    Azure Repos uses OAuth tokens by default

    GCM now returns Microsoft identity OAuth tokens, rather than creating personal access tokens (PATs), by default for Azure Repos. OAuth tokens are automatically refreshed as needed.

    Explicit credential-type settings are still respected. If you need the previous PAT behavior, set:

    git config --global credential.azreposCredentialType pat
    

    The equivalent environment variable is GCM_AZREPOS_CREDENTIALTYPE=pat. See [Azure Repos users and tokens][azrepos-tokens]. ([git-ecosystem/git-credential-manager#2449][pr-2449])

    Microsoft authentication uses the OS broker by default

    Broker integration is now enabled by default wherever supported, rather than requiring an opt-in. This applies to Microsoft authentication, such as Azure Repos; it does not change authentication for GitHub, Bitbucket, or GitLab.

    On macOS, broker authentication requires Company Portal and device enrollment. On Linux, it requires the supported Intune setup, a GNOME desktop, and Microsoft Edge; headless and WSL environments do not support the Linux broker.

    [!WARNING] Depending on your organization's policies, broker sign-in can prompt you to join or enroll your device. On Windows, signing in with a personal Microsoft account can also affect the account linked to your local Windows user. Review the [broker documentation][broker] before proceeding, especially on personal devices.

    To opt out:

    git config --global credential.msauthUseBroker false
    

    The equivalent environment variable is GCM_MSAUTH_USEBROKER=false. When the broker is in use, it takes precedence over credential.msauthFlow. ([git-ecosystem/git-credential-manager#2449][pr-2449])

    Azure Repos uses a dedicated GCM Entra application

    GCM now signs in using its own first-party Microsoft Entra application instead of the Visual Studio application. This enables broker support on macOS and Linux, in addition to Windows.

    If you encounter a client-application configuration error, GCM provides guidance for retrying with the legacy application; it does not silently switch back. For a one-command compatibility retry:

    git -c credential.azreposUseLegacyClientId=true fetch
    

    Please report the original failure if this workaround succeeds. The legacy application does not support broker authentication on macOS or Linux. Managed identity, service-principal, and workload-identity federation flows are unaffected by the application change.

    The undocumented developer overrides credential.azreposDevClientId and `credential.az

  4. v2.9.1GCM 2.9.12026-07-14 · 2026-07-14 17:02 UTC
    查看更新说明

    Announcements:

    [!NOTE] This is planned to be the last release major release (2.x) that supports Windows 7 and 8.x. We will be moving off of .NET Framework to .NET (Core) on Windows this year with version 3.0.

    Changes:

    • Use AbsoluteUri to open URIs in the system browser to avoid double encoded URLs on macOS (90884de0cce7b320271172116a7cf195444127f7)
  5. v2.9.0GCM 2.9.02026-07-14 · 2026-07-14 17:01 UTC
    查看更新说明

    Announcements:

    [!NOTE] This is planned to be the last release major release (2.x) that supports Windows 7 and 8.x. We will be moving off of .NET Framework to .NET (Core) on Windows this year with version 3.0.

    Changes:

    • Update MSAL.NET libraries to 4.82.2 (a4743f9f8515792be7da6c606c7a2865c6409d76)
    • Use default native redirect URL for embedded webview and device flows with Microsoft authentication (2774321bbc650e454c9eb485d15a7639c0c1edae)
    • Add support for form_post and fragment OAuth2 response modes to the generic provider (194ba290ce533465310d50f811684ab180536ae7)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Git Credential Manager

    Build Status


    Git Credential Manager (GCM) is a secure Git credential helper built on .NET that runs on Windows, macOS, and Linux. It aims to provide a consistent and secure authentication experience, including multi-factor auth, to every major source control hosting service and platform.

    GCM supports (in alphabetical order) Azure DevOps, Azure DevOps Server (formerly Team Foundation Server), Bitbucket, GitHub, and GitLab. Compare to Git's built-in credential helpers (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret), which provide single-factor authentication support for username/password only.

    GCM replaces both the .NET Framework-based Git Credential Manager for Windows and the Java-based Git Credential Manager for Mac and Linux.

    Install

    See the installation instructions for the current version of GCM for install options for your operating system.

    Current status

    Git Credential Manager is currently available for Windows, macOS, and Linux and works with HTTP(S) remotes.

    You can still use Git with SSH - see the specific documentation for your host on how to set up SSH: Azure DevOps, GitHub, Bitbucket

    FeatureWindowsmacOSLinux¹
    Installer/uninstaller✓✓✓
    Secure platform credential storage✓✓✓
    Entra authentication with broker support✓✓✓
    Azure DevOps authentication✓✓✓
    GitHub & GHES authentication✓✓✓
    Bitbucket Cloud & DC authentication✓✓✓
    GitLab authentication✓✓✓
    Windows Integrated Authentication (NTLM/Kerberos)✓N/AN/A
    Generic OAuth authentication✓✓✓
    Basic HTTP authentication✓✓✓
    Network proxies✓✓✓
    x64 (x86_64 / AMD64) support✓✓²✓
    x86 (i686) support✓³N/A✗
    ARM64 (aarch64) support✓✓✓
    ARM32 (armhf) supportN/AN/A✓³
    1. Linux support is limited to the distributions officially supported by .NET.

    2. Mac support on Intel-based (x64) devices is best effort. Apple announced that macOS 28 will drop support for Intel-based applications.

    3. No official builds produced, but local builds should be possible. Support is best effort.

    Supported Environments

    We aim to support the broadest set of operating systems and distributions, within reason. We aim to target and update to the latest current .NET LTS version as they become generally available.

    Windows

    GCM supports Windows 10 and later, including Windows Server 2016 and later. This is the same support matrix as the .NET runtime on Windows.

    Windows Subsystem for Linux (WSL)

    See detailed WSL information here.

    Windows 7 and Windows 8.x

    As of GCM version 3.x, Windows 7 and Windows 8.x are no longer supported. We continue to provide minimal, security-only support for GCM 2.9.x on Windows 7 and Windows 8.x, but we recommend upgrading to a supported version of Windows.

    The maint-v2 and releases/v2 branches are maintained to allow for security patches and releases for GCM v2.x for Windows 7 and Windows 8.x only. These branches will not receive new features.

    macOS

    GCM supports macOS 14 and later. This is the same support matrix as the .NET runtime on macOS.

    Linux

    GCM provides support only for the Linux distributions that are officially supported by dotnet.

    Git compatibility

    Git Credential Manager tries to be compatible with the broadest set of Git versions (within reason). However there are some known problematic releases of Git that are not compatible.

    • Git 1.x

      The initial major version of Git is not supported or tested with GCM.

    • Git 2.26.2

      This version of Git introduced a breaking change with parsing credential configuration that GCM relies on. This issue was fixed in commit 12294990 of the Git project, and released in Git 2.27.0.

    How to use

    Once it's installed and configured, Git Credential Manager is called implicitly by Git. You don't have to do anything special, and GCM isn't intended to be called directly by the user. For example, when pushing (git push) to Azure DevOps, Bitbucket, or GitHub, a window will automatically open and walk you through the sign-in process.

    This process will look slightly different for each Git host, and even in some cases, whether you've connected to an on-premises or cloud-hosted Git host. Later Git commands in the same repository will re-use existing credentials or tokens that GCM has stored for as long as they're valid.

    Read full command line usage here.

    Configuring a proxy

    See detailed information here.

    Additional Resources

    See the documentation index for links to additional resources.

    Experimental Features

    • (None at this time)

    Future features

    Curious about what's coming next in the GCM project? Take a look at the project roadmap! You can find more details about the construction of the roadmap and how to interpret it here.

    Contributing

    This project welcomes contributions and suggestions. See the contributing guide to get started.

    This project follows GitHub's Open Source Code of Conduct.

    License

    We're MIT licensed. When using GitHub logos, please be sure to follow the GitHub logo guidelines.