如何在 posh-git 中缓存 VS online 的凭据?

How to cache credentials for VS online in posh-git?

我在线使用 Visual Studio 与 git 和 PowerShell (posh-git)。我在我的 VS 配置文件中设置了备用凭据,所以我有 username/password。每当我在 posh-git 中发出 git pull 时,我都必须输入我的凭据 - 这很烦人。我可以至少在 PowerShell 打开时以某种方式缓存它吗?

根据 Codeplex 上的 popular posh-git credentials search results you need a small helper app called git-credential-winstore,非常适合您的用例。

参考资料

Sascha Gottfried 的回答是正确的,但现在有点过时了,您现在需要为 Windows

安装 Git Credential Manager

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/

下载Link:https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/latest