Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error fatal: credential-cache unavailable; no Unix socket support [duplicate]

Tags:

git

github

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'.
like image 763
DAni M Avatar asked Jun 12 '21 17:06

DAni M


Video Answer


2 Answers

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.

like image 128
bk2204 Avatar answered Oct 17 '22 09:10

bk2204


To delete the entry for helper, do:

git config --global --unset credential.helper
like image 3
lubo Avatar answered Oct 17 '22 07:10

lubo