[Solved] fatal: credential-cache unavailable; no unix socket support

Article Sharif Ahmed

If you are using Windows and your system does not have Unix socket support in that condition while using git credential cache or you misconfigured credential helper then you may face an error that says,

fatal: credential-cache unavailable; no Unix socket support

In this article, we are showing some easiest methods of solving the problem.

Method 1:

If your system does not offer Unix socket support or you misconfigured the setup you may face the error. So, you should run

git config -l --show-origin
to find out where you've set the credential.helper option to cache. After running the command you will get a list of configurations. Then, go to the file location open the file in a text editor like vim, VS code, notepad then remove that entry of credential helper cache as it won't work in your version of Git.

Method 2:

Check your git version using

git --version

Since msysgit has been supplanted by Git for Windows, the most convenient alternative is to use Git for Windows. The Git Credential Manager is enabled by default in some versions of the Git for Windows installation (for example, 2.7.4). While installing git mark the checkboxes shown in the picture below

For msysgit versions 1.8.1 and above

In msysgit 1.8.1, the wincred helper was added. Simply run the command to use this

git config --global credential.helper wincred

For msysgit versions older than 1.8.1

  • Install git-credential-winstore in your git bin directory after downloading it.
  • Next, double-check that the git.cmd directory is in your Path environment variable. On a 64-bit system, the default directory is C:\Program Files (x86)\Gitcmd, while on a 32-bit system, it's C:\Program Files\Gitcmd. Launching a command prompt and type git and then hit enter button. It's not set up correctly if you don't get a list of git commands.
  • After correctly setting up git just run the command
    git config --global credential.helper winstore
    Or you may also manually update your project .gitconfig file:
    [credential]
        helper = winstore

After that, you may use Windows Credential Manager in the Windows Control Panel to manage your git credentials.

  • First, run
    git config --global credential.helper wincred
  • Then go to your Windows Control Panel. Then click on User Accounts, Next click on Credential Manager. Then, Windows Credential and finally, Generic Credential
  • Then click in add a credential and add
    Internet or network address: git:https://{username}.github.com
    User: [Enter your username]
    Password: [Enter your git personal access token]

Note: If you don't know how to create a git personal access token you can check this article.

For Mac

For mac simply run the command

git config --global credential.helper osxkeychain

Thank you for reading the article. Hope this will solve your problem.