我遇到了这个问题,对我来说,它原来是cygcurl-4.dll
我编译并安装到 /usr/local/bin 的一个狡猾的版本。我删除了那个文件,现在 git 可以工作了。
对于其他人,我的修复细节可能有所不同,但这就是我进行调试的方式。现在有一个strace
用于 Cygwin 的基本版本,但我不确定它来自哪个包。
为了跟踪子进程的产生(除其他外),我使用了strace --mask=sigp git clone https://github.com/<user>/<repo>.git
. 浏览了一下,我发现了这个块:
--- 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
之后是所有的出口清理。所以问题发生在 DLL 加载过程中/usr/libexec/git-core/git-remote-https.exe
。Cygwin 通常不会告诉您太多关于这些错误的信息,但是如果您“使用 Windows”启动程序,它会显示一个错误框。
cygstart /usr/libexec/git-core/git-remote-https.exe
弹出一个框,上面写着
The procedure entry point curl_global_sslset could not be located
in the dynamic link library cygcurl-4.dll.
检查它试图加载哪些库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
所以手动安装C:\cygwin64\usr\local\bin\cygcurl-4.dll
很可能是一个候选者,删除它为我解决了这个问题。