/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get: 1: /mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe: not found
I found this problem then git ask me for a username and password to authenticate to GitHub whenever I'm doing git activity with GitHub remote repository from my local WSL2 environment.
It is very annoying to do this every time, then I search and follow several tutorials I can find on the internet, but everything just led me to the same problem again, these tutorial is not solving my problem at all.
Every tutorial tells me that I should add the GCM directory in the Windows environment for the git in the WSL2 environment. Theoretically, it should solve my problem, but it is not.
If there is no git-credential-core.exe in your git folder, then use it instead of the git-credential-wincred.exe. No -core executable file exists, so I use the -wincred file.
Execute this command on WSL2 (use the -core rather than -wincred if it exists):
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-core.exe"
only if the above command ❌ fails or does not solve the problem, change to -wincred
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe"
I think git-credential-manager-core.exe has already been renamed git-credential-wincred.exe, but many tutorials on the internet are already deprecated because they gave us the old name of this executable file. This is my biggest problem because following any tutorial makes me find the same error over time.
I faced a similar issue on WSL2 with Windows 10 when I upgraded Git for Windows to one of the recent versions (2.37.0 I think). This is because the git-credential-manager-core.exe has been moved to a different folder.
Solution:
To fix this issue, run the following command from your bash command line:
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager-core.exe"
Note: If you have Git installed in a different drive/folder - update the path accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With