当执行某些命令(如"prune")时,Wincred无法与Git Bash(适用于Windows的Git)一起正常使用. [英] Wincred not working properly with Git Bash(Git for Windows) when executing certain commands like "prune"

查看:219
本文介绍了当执行某些命令(如"prune")时,Wincred无法与Git Bash(适用于Windows的Git)一起正常使用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows 7 64Bit中使用凭据管理器"Wincred"很好地设置了GitforWindows.

I have setup GitforWindows in my Windows 7 64Bit pretty well with Credential manager as "Wincred".

但是,当我在GitBash中运行诸如git remote prune origin之类的命令时,尽管在运行该命令,但在控制台中却出现以下错误:

Yet when I run some commands like git remote prune origin in GitBash, it gives following error in console, though runs the command:

Failed to load advapi32.dll

那是为什么?如果需要使用凭据管理器设置来完成某些工作,那么我需要全面说明如何进行这些设置以及每个设置的含义.

Why is that ? If there is something need to be done with Credential manager settings, then I need full explanation of how to do those settings and what each setting means.

注意::这个问题仅适用于某些命令,其他命令运行正常,没有任何错误.

Note: This problem I have only with some commands, other commands are running just fine without any errors.

推荐答案

如果您使用的是

If you are using the latest Git for Windows, make sure to set your credential helper to manager, not WinCred (which was obsoleted some times ago)

git config --global credential.helper manager

这将使用 GCM(Git-Credential-Manager-for-Windows ).

作为在这里提到:

它是 Git(git-credential-winstore)的Windows凭据存储的继任者, 已不再维护.

与用于Windows的Git内置凭据存储(wincred)相比,该存储可在任何启用HTTP的Git存储库上提供单因素身份验证支持,而GCM为Azure DevOps,Team Foundation Server,GitHub提供多因素身份验证支持和Bitbucket.

Compared to Git's built-in credential storage for Windows (wincred), which provides single-factor authentication support working on any HTTP enabled Git repository, GCM provides multi-factor authentication support for Azure DevOps, Team Foundation Server, GitHub, and Bitbucket.

这篇关于当执行某些命令(如"prune")时,Wincred无法与Git Bash(适用于Windows的Git)一起正常使用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆