I had this issue, and for me it turned out to be a dodgy version of cygcurl-4.dll
I'd compiled and installed to /usr/local/bin. I deleted that file, and now git works.
The particulars of my fix may be different for others, but this is how I went about debugging. There is now a basic version of strace
for Cygwin, I'm not sure what package it came from though.
To track spawning of child processes (among other things), I used strace --mask=sigp git clone https://github.com/<user>/<repo>.git
. Looking through, I found this block:
--- Process 12224 created
922 5807 [main] git 11849! child_info_spawn::worker: new process name \\?\C:\cygwin64\usr\libexec\git-core\git-remote-https.exe
--- Process 12224 loaded C:\Windows\System32\ntdll.dll at 0000000077830000
25 5832 [main] git 11849! child_info_spawn::worker: spawned windows pid 12224
41 5873 [main] git 11849! child_info::sync: n 2, waiting for subproc_ready(0x188) and child process(0x178)
--- Process 12224 loaded C:\Windows\System32\kernel32.dll at 0000000077610000
--- Process 12224 loaded C:\Windows\System32\KernelBase.dll at 000007fefd870000
--- Process 12224 loaded C:\cygwin64\usr\local\bin\cygcurl-4.dll at 0000000482aa0000
--- Process 12224 loaded C:\cygwin64\bin\cygcrypto-1.0.0.dll at 00000003d5120000
--- Process 12224 loaded C:\cygwin64\bin\cygwin1.dll at 0000000180040000
--- Process 12224 loaded C:\cygwin64\bin\cygz.dll at 00000003b0490000
--- Process 12224 loaded C:\cygwin64\bin\cygrtmp-0.dll at 00000003ac650000
--- Process 12224 loaded C:\cygwin64\bin\cygssl-1.0.0.dll at 00000003ab640000
--- Process 12224 loaded C:\cygwin64\bin\cygssh2-1.dll at 00000003ab6b0000
--- Process 12224, exception c0000139 at 00000000778f8078
--- Process 12224 exited with status 0xc0000139
After that comes all the exit cleanup. So the problem occurs during DLL loading for /usr/libexec/git-core/git-remote-https.exe
. Cygwin usually doesn't tell you much about these errors, but if you launch the program "with Windows", it'll show an error box.
cygstart /usr/libexec/git-core/git-remote-https.exe
pops up a box that says
The procedure entry point curl_global_sslset could not be located
in the dynamic link library cygcurl-4.dll.
Checking which libraries it's trying to load with cygcheck /usr/libexec/git-core/git-remote-https.exe
:
C:\cygwin64\usr\libexec\git-core\git-remote-https.exe
C:\cygwin64\usr\local\bin\cygcurl-4.dll
C:\cygwin64\bin\cygcrypto-1.0.0.dll
C:\cygwin64\bin\cygwin1.dll
C:\Windows\system32\KERNEL32.dll
C:\Windows\system32\ntdll.dll
C:\Windows\system32\KERNELBASE.dll
(... many more Windows 7 DLLs ...)
C:\cygwin64\bin\cygz.dll
C:\cygwin64\bin\cygrtmp-0.dll
C:\cygwin64\bin\cygssl-1.0.0.dll
C:\cygwin64\bin\cygssh2-1.dll
C:\cygwin64\bin\cygiconv-2.dll
C:\cygwin64\bin\cygintl-8.dll
So the manually installed C:\cygwin64\usr\local\bin\cygcurl-4.dll
is a very likely candidate, and deleting it fixed the issue for me.