When running the gpg.exe command (part of Git-Bash) I get the following error:
gpg (5076) C:\some_path\Git\usr\bin\gpg.exe: *** fatal error - add_item ("\??\C:\some_path\Git", "/", ...) failed, errno 1
Stack trace:
Frame Function Args
000FFFFCCE0 001800638AE (00180288FCA, 00180263FD1, 00800000000, 000FFFF8B50)
000FFFFCCE0 0018004973A (00000000000, 000FFFFCCE0, 00180020010, 000FFFFABFE)
000FFFFCCE0 00180049772 (000FFFF9BD0, 00000000001, 00800000000, 525C3A425C3F3F5C)
000FFFFCCE0 001800EB3EF (00000000000, 00040000024, 00000000000, 00000000000)
000FFFFCCE0 0018013DE25 (001800D212A, 00000000000, 00000000000, 00000000000)
000FFFFCCE0 00180049D95 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180048846 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 001800488F4 (00000000000, 00000000000, 00000000000, 00000000000)
I am calling it using subprocess.run
with shell=True
on a Windows server, but I can also reproduce this crash in powershell.
What worked was to "tunnel" the entire call through the bash.exe:
C:\some_path\Git\usr\bin\gpg.exe arg1 arg2
becomes
C:\some_path\Git\bin\bash.exe -c "gpg arg1 arg2"
and the issue mysteriously disappears!