git: 'credential-cache' 不是 git 命令 - 删除设置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20060572/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:20:03  来源:igfitidea点击:

git: 'credential-cache' is not a git command - Remove setting

gitcachingconfig

提问by Bradley Flood

After attemptingto setup git credential cache on Windows 7 I would now like to scrap the idea and remove this error message and setting from git.

尝试在 Windows 7 上设置 git 凭据缓存后,我现在想放弃这个想法并从 git 中删除此错误消息和设置。

git: 'credential-cache' is not a git command.

git: 'credential-cache' is not a git command.

This related questionshows how to fix this error by installing additional software to make the credential caching work -- I however wish to remove this setting all together.

这个相关问题显示了如何通过安装其他软件来修复此错误以使凭证缓存工作 - 但是我希望一起删除此设置。

How do I do this?

我该怎么做呢?

I have tried: git config --global --remove-section credential-cacheand variations thereof. Also it does not exist in my .git/config file either.

我尝试过: git config --global --remove-section credential-cache及其变体。它也不存在于我的 .git/config 文件中。

回答by Bradley Flood

Running git config --global -eallowed me to remove the offending config setting from the global git config.

运行git config --global -e允许我从全局 git 配置中删除有问题的配置设置。

[credential]
helper = winstore

回答by Nenad Bulatovic

I had same problem with error:

我有同样的错误问题:

$ git push -u origin master
git: 'credential-cache' is not a git command. See 'git --help'.
Branch master set up to track remote branch master from origin.
Everything up-to-date

So I decided to get rid of credential caching altogether, and I did it with in Git bash:

所以我决定完全摆脱凭证缓存,我在 Git bash 中做到了:

git config --global -e

then I found

然后我发现

[credential]
    helper = cache

and deleted it, saved file and after I tried again result was:

并删除它,保存文件,我再次尝试后结果是:

$ git push
Everything up-to-date

So error gone away.

所以错误消失了。

回答by James Adkison

I ran git config --global -ebut it did not contain any sections related to credentials.

我跑了,git config --global -e但它不包含任何与凭据相关的部分。

However, when I ran git config -eI did find there was a [credential]section.

但是,当我跑步时,git config -e我确实发现有一个[credential]部分。

The following command resolved the issue for me.

以下命令为我解决了这个问题。

git config --remove-section credential

git config --remove-section credential

回答by ladygargar

Just reaffirming what Bradley Flood correctly said, running git config --global -eworked for me too and to extend on this the config setting I deleted was:

只是重申 Bradley Flood 所说的正确,运行git config --global -e也对我有用,并在此基础上扩展我删除的配置设置是:

    [credential]
    helper = winstore

回答by Vinyas Bj

I fixed this issue in ubuntu ,just type below command in terminal.

我在 ubuntu 中解决了这个问题,只需在终端中输入以下命令即可。

sudo git config --system --unset credential.helper manager

this worked for me.

这对我有用。