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

元气小坏坏 提交于 2020-01-01 01:18:27

问题


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

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

This related question shows 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-cache and variations thereof. Also it does not exist in my .git/config file either.


回答1:


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

[credential]
helper = winstore



回答2:


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 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.




回答3:


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

    [credential]
    helper = winstore



回答4:


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

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

The following command resolved the issue for me.

git config --remove-section credential




回答5:


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

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

this worked for me.



来源:https://stackoverflow.com/questions/20060572/git-credential-cache-is-not-a-git-command-remove-setting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!