24

I'm having an app and trying to push it to a Private rep but not sure why I'm getting this error: Code didn't show up on GitHub

>git push -u origin main
    fatal: credential-cache unavailable; no unix socket support
    Everything up-to-date
    Branch 'main' set up to track remote branch 'main' from 'origin'.
DAni M
  • 683
  • 1
  • 10
  • 21
  • https://stackoverflow.com/search?q=%5Bgit%5D+fatal%3A+credential-cache+unavailable%3B+no+unix+socket+support – phd Jun 13 '21 at 12:08
  • 1
    I know that this question is closed and marked as duplicate and that there is redirection on another question... BUT: I just had the same problem and I tried some advices...nothing worked. Then I found this thread: https://community.atlassian.com/t5/Bitbucket-questions/Error-Logon-failed-use-ctrl-c-to-cancel-basic-credential-prompt/qaq-p/1540433 . There is simpe solution in four steps: 1. Go to Tools in Sourcetree > Options >Authentication 2. Delete account from there. 3. Then click On Add button and refresh OAuth Token 4. After success ... Get On Your Work – Martin Trampus Apr 14 '22 at 14:28
  • Reported bug https://github.com/git-for-windows/git/issues/3892 – Colonel Panic Jun 13 '22 at 16:05
  • 1
    **Workaround**: install and configure [Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager#windows) `git-credential-manager-core --configure`. The default credential store [Windows Credential Manager](https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/credstores.md#windows-credential-manager) `git config --global credential.credentialStore wincredman` works very well. – Colonel Panic Jun 13 '22 at 16:14

2 Answers2

43

Somewhere in your configuration, you have a credential helper set to cache and on your system you don't have Unix socket support, almost certainly because your system is Windows. (If you are on a Unix system, your system is seriously misconfigured.)

You should run git config -l --show-origin to find out where you've set the credential.helper option to cache and remove that entry, since the credential helper won't work in your version of Git.

Note that newer versions of Windows 10 do offer Unix sockets, but by default Git is not compiled to use them on Windows.


That starts to change with Git 2.34 (Q4 2021), which adjusts credential-cache helper to Windows.

See commit bb390b1, commit 245670c, commit 0fdcfa2 (14 Sep 2021) by Carlo Marcelo Arenas Belón (carenas).
(Merged by Junio C Hamano -- gitster -- in commit c2e7990, 23 Sep 2021)

git-compat-util: include declaration for unix sockets in windows

Signed-off-by: Carlo Marcelo Arenas Belón

Available since Windows 10 release 1803 and Windows Server 2019.

NO_UNIX_SOCKETS is still the default for Windows builds, as they need to keep backward compatibility with releases up to Windows 7, but allow including the header otherwise.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
bk2204
  • 64,793
  • 6
  • 84
  • 100
20

To delete the entry for helper, do:

git config --global --unset credential.helper
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
lubo
  • 201
  • 2
  • 3