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

后端 未结 12 1804
我寻月下人不归
我寻月下人不归 2020-11-28 00:42

I followed these instructions to the letter, including the part about password caching. It seems like the instructions are wrong, because every time I git push origin

12条回答
  •  抹茶落季
    2020-11-28 00:57

    A similar error is 'credential-wincred' is not a git command

    The accepted and popular answers are now out of date...

    wincred is for the project git-credential-winstore which is no longer maintained.

    It was replaced by Git-Credential-Manager-for-Windows maintained by Microsoft open source.

    Download the release as zip file from link above and extract contents to

    \cygwin\usr\libexec\git-core
    

    (or \cygwin64\usr\libexec\git-core as it may be)

    Then enable it, (by setting the global .gitconfig) - execute:

    git config --global credential.helper manager
    

    How to use

    No further config is needed.

    It works [automatically] when credentials are needed.

    For example, when pushing to Azure DevOps, it opens a window and initializes an oauth2 flow to get your token.

    ref:

    • https://github.com/babun/babun/issues/318

    • https://github.com/Microsoft/Git-Credential-Manager-for-Windows#installation-in-an-msys2-environment

提交回复
热议问题