简体   繁体   English

从 Visual Studio 2019 禁用 Git 的 Windows 凭据管理器

[英]Disable Git Credential manager for Windows from Visual Studio 2019

I am using following我正在使用以下

  • Visual Studio 2019 Professional. Visual Studio 2019 专业版。
  • Git for Windows 2.29.2 Git 用于 Windows 2.29.2

Suddenly I am getting following popup突然我开始关注弹出窗口

在此处输入图像描述

I have tried to disable using command git config and also manually removed credential.manager from config and this popup still comes.我尝试使用命令 git 配置禁用并且还从配置中手动删除 credential.manager 并且此弹出窗口仍然存在。

Due to this if I provided Azure DevOps credential, it get fails with authentication failed.因此,如果我提供 Azure DevOps 凭据,它会因身份验证失败而失败。

I have recently update the git and also tried to reinstall git extension for visual studio but it is not helping.我最近更新了 git 并尝试重新安装 Visual Studio 的 git 扩展,但它没有帮助。

In popup if I provide username as PersonalAccessToken and password as PAT I have generated then everything seems to be working.在弹出窗口中,如果我提供用户名作为 PersonalAccessToken 和密码作为我生成的 PAT,那么一切似乎都在工作。

In popup if I provide username as PersonalAccessToken and password as PAT I have generated then everything seems to be working.在弹出窗口中,如果我提供用户名作为 PersonalAccessToken 和密码作为我生成的 PAT,那么一切似乎都在工作。

That would be the recommended course of action: it should cache again your credentials and not ask for them again after that.这将是推荐的行动方案:它应该再次缓存您的凭据,之后不再要求它们。

Recent Git for Windows releases have switches to Git Credential Manager Core "GCM Core"最近的Git 用于 Windows版本已切换到Git 凭据管理器核心“GCM 核心”

Make sure that, in command-line, git config --global credential.helper is set to manager-core .确保在命令行中, git config --global credential.helper设置为manager-core


Note that before Git 2.30 (Q1 2021), multiple " credential-store " backends can race to lock the same file, causing everybody else but one to fail---reattempt locking with some timeout to reduce the rate of the failure.请注意,在 Git 2.30(2021 年第一季度)之前,多个“ credential-store ”后端可能会竞相锁定同一个文件,导致除一个之外的其他所有人都失败——重新尝试锁定一段时间以降低失败率。

See commit df7f915 (25 Nov 2020) by Simão Afonso ( simaoafonso-pwt ) .请参阅Simão Afonso ( simaoafonso-pwt )提交 df7f915 (2020 年 11 月 25 日)。
(Merged by Junio C Hamano -- gitster -- in commit 3d8f81f , 30 Nov 2020) (由Junio C Hamano -- gitster --提交 3d8f81f中合并,2020 年 11 月 30 日)

crendential-store : use timeout when locking file crendential-store : 锁定文件时使用超时

Signed-off-by: Simão Afonso签字人:西芒·阿方索

When holding the lock for rewriting the credential file, use a timeout to avoid race conditions when the credentials file needs to be updated in parallel.当持有用于重写凭证文件的锁时,当凭证文件需要并行更新时,使用超时来避免竞争条件。

An example would be doing fetch --all on a repository with several remotes that need credentials, using parallel fetching.一个示例是使用并行获取在具有多个需要凭据的遥控器的存储库上执行fetch --all

The timeout can be configured using "credentialStore.lockTimeoutMS", defaulting to 1 second.可以使用“credentialStore.lockTimeoutMS”配置超时,默认为 1 秒。

git config now includes in its man page : git config现在包含在其手册页中:

credentialStore.lockTimeoutMS

The length of time, in milliseconds, for git-credential-store to retry when trying to lock the credentials file.尝试锁定凭证文件时git-credential-store重试的时间长度(以毫秒为单位)。

  • Value 0 means not to retry at all;值 0 表示根本不重试;
  • -1 means to try indefinitely. -1 表示无限期地尝试。
    Default is 1000 (ie, retry for 1s).默认为 1000(即重试 1 秒)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM