Re: credential-store get: No such file or directory
From: Steven Penny <hidden>
Date: 2021-11-04 14:12:50
On Thu, Nov 4, 2021 at 4:43 AM Jeff King wrote:
It's because internally, the "git credential-store get" command is assembled as a single string passed to the shell, whereas remote-https is run directly via exec/spawn.
Actually, I bet that is whats causing the problem. I am using MSYS2 Git [1],
which is not a native Windows build of Git, but one that relies on the MSYS2 DLL
for path translations and such. I have actually built a Windows native Git, but
its a pain, so its easier just to use the package. Anyway, the "non native"
Windows version, probably considers Bash the shell, so any commands being passed
to a shell probably will be looking for Bash. I dont have Bash on my system,
because for the most part I dont want or need it. If I need a shell, I just use
PowerShell.
Would it be possible for Git to just run "credential-store" directly, like other
commands? I assume stuff like "~/.git-credentials" would be a problem, but
couldnt you just do something like this instead (pseudocode):
var cred string = os.Getenv("HOME") + "/.git-credentials"
1. https://packages.msys2.org/package/git