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

后端 未结 12 1742
我寻月下人不归
我寻月下人不归 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:49

    First find the version you are using for GIT.

    using this command : git --version

    if you have a newer version than 1.7.10.

    Then simply use this this command.

    Windows:

    git config --global credential.helper wincred
    

    MAC

    git config --global credential.helper osxkeychain
    

    Reference

    0 讨论(0)
  • 2020-11-28 00:49

    There is now a much easier way to setup Git password caching by double clicking a small exe on Windows. The program is still based on git-credential-winstore mentioned by the top voted answer, although the project has been moved from GitHub to http://gitcredentialstore.codeplex.com/

    You can download the exe (and a binary for Mac) from this blog post: https://github.com/blog/1104-credential-caching-for-wrist-friendly-git-usage

    0 讨论(0)
  • 2020-11-28 00:49

    For the sake of others having this issue - I landed here because I tried to get cute with how I set up a new github repository, but per the setup page credential helper doesn't work unless you clone a repository.

    "Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication. This guide offers help generating and using an SSH key pair."

    0 讨论(0)
  • 2020-11-28 00:50

    I faced this problem while using AptanaStudio3 on windows7. This helped me:

    git config --global credential.helper wincred
    

    Code taken from here

    0 讨论(0)
  • 2020-11-28 00:54

    I fixed this issue by removing the credential section from the config of specific project:

    • Just typed: git config -e
    • Inside the editor I removed the whole section [credential] helper = cache.

    This removed the annoying message :

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

    0 讨论(0)
  • 2020-11-28 00:55

    For the sake of others who come on this issue, I had this same problem in Ubuntu (namely that my passwords weren't caching, despite having set the option correctly, and getting the error git: 'credential-cache' is not a git command.), until I found out that this feature is only available in Git 1.7.9 and above.

    Being on an older distribution of Ubuntu (Natty; I'm a stubborn Gnome 2 user) the version in the repo was git version 1.7.4.1. I used the following PPA to upgrade: https://launchpad.net/~git-core/+archive/ppa

    0 讨论(0)
提交回复
热议问题