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.

Git 凭据管理器 (GCM) 是基于 .NET 构建的安全 Git 凭据帮助程序,可在 Windows、macOS 和 Linux 上运行。它旨在为每个主要的源代码管理托管服务和平台提供一致且安全的身份验证体验,包括多因素身份验证。

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 支持(按字母顺序)Azure DevOps、Azure DevOps Server(以前称为 Team Foundation Server)、Bitbucket、GitHub 和 GitLab。与 Git 的内置凭据助手(Windows:wincred、macOS:osxkeychain、Linux:gnome-keyring/libsecret)相比,后者仅为用户名/密码提供单因素身份验证支持。

GCM replaces both the .NET Framework-based Git Credential Manager for Windows and the Java-based Git Credential Manager for Mac and Linux. GCM 取代了基于 .NET Framework 的 Git 凭据管理器(适用于 Windows)和基于 Java 的 Git 凭据管理器(适用于 Mac 和 Linux)。

Install 安装

See the installation instructions for the current version of GCM for install options for your operating system. 有关操作系统的安装选项,请参阅当前版本的 GCM 的安装说明。

Current status 现状

Git Credential Manager is currently available for Windows, macOS, and Linux*. GCM only works with HTTP(S) remotes; you can still use Git with SSH: Git 凭据管理器目前可用于 Windows、macOS 和 Linux*。GCM 仅适用于 HTTP(S) 远程;您仍然可以将 Git 与 SSH 一起使用:

Azure DevOps SSHGitHub SSHBitbucket SSH

Feature 特征Windows 窗户macOS macOS操作系统Linux*Installer/uninstaller 安装程序/卸载程序✓✓✓Secure platform credential storage (see more) 安全平台凭据存储(查看更多)✓✓✓Multi-factor authentication support for Azure DevOps Azure DevOps的多重身份验证支持✓✓✓Two-factor authentication support for GitHub GitHub 的双因素身份验证支持✓✓✓Two-factor authentication support for Bitbucket Bitbucket 的双因素身份验证支持✓✓✓Two-factor authentication support for GitLab GitLab 的双因素身份验证支持✓✓✓Windows Integrated Authentication (NTLM/Kerberos) support Windows 集成身份验证 (NTLM/Kerberos) 支持✓N/A 不适用N/A 不适用Basic HTTP authentication support 基本 HTTP 身份验证支持✓✓✓Proxy support 代理支持✓✓✓amd64 support  amd64 支持✓✓✓x86 support  x86 支持✓N/A 不适用✗arm64 support  arm64 支持best effort 尽最大努力✓best effort, no packages 尽最大努力,没有套餐armhf support  armhf 支持N/A 不适用N/A 不适用best effort, no packages 尽最大努力,没有套餐

(*) GCM guarantees support only for the Linux distributions that are officially supported by dotnet. (*)GCM 保证仅支持 dotnet 正式支持的 Linux 发行版。

Supported Git versions 支持的 Git 版本

Git Credential Manager tries to be compatible with the broadest set of Git versions (within reason). However there are some know problematic releases of Git that are not compatible. Git Credential Manager 尝试与最广泛的 Git 版本集兼容(在合理范围内)。但是,有一些已知的有问题的 Git 版本不兼容。

Git 1.x The initial major version of Git is not supported or tested with GCM. GCM 不支持或测试 Git 的初始主要版本。 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. 此版本的 Git 引入了 GCM 所依赖的解析凭据配置的重大更改。此问题已在 Git 项目的提交 12294990 中修复,并在 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.

安装和配置后,Git 会隐式调用 Git 凭据管理器。您无需执行任何特殊操作,并且 GCM 不应由用户直接调用。例如,将 ( git push ) 推送到 Azure DevOps、Bitbucket 或 GitHub 时,将自动打开一个窗口,并引导你完成登录过程。(对于每个 Git 主机,此过程看起来会略有不同,甚至在某些情况下,无论你是连接到本地还是云托管的 Git 主机。稍后,同一存储库中的 Git 命令将重复使用 GCM 存储的现有凭据或令牌,只要它们有效。

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 实验性功能

Windows broker (experimental)Windows 代理(实验性)

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. 对 GCM 项目的下一步计划感到好奇吗?看看项目路线图!您可以在此处找到有关路线图构建以及如何解释路线图的更多详细信息。

Contributing 贡献

This project welcomes contributions and suggestions. See the contributing guide to get started. 本项目欢迎投稿和建议。请参阅贡献指南以开始使用。

This project follows GitHub's Open Source Code of Conduct. 此项目遵循 GitHub 的开源代码行为准则。

License 许可证

We're MIT licensed. When using GitHub logos, please be sure to follow the GitHub logo guidelines. 我们获得了麻省理工学院的许可。使用 GitHub 徽标时,请务必遵循 GitHub 徽标指南。

好文推荐

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: