-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"git ls-remote" fails with error about failing to load library libcurl-4.dll #4573
Comments
Is it possible that in your restricted environment, regular programs are prohibited from loading |
I doubt that, but I don't know for sure. Is there a way I could verify that? And has there been a change in the use of that |
If you can compile C programs, you could try to compile and run this: #include <windows.h>
#include <stdio.h>
int main(int argc, char **argv)
{
const char *dll = argc > 1 ? argv[1] : "C:\\Program Files\\Git\\mingw64\\bin\\libcurl-4.dll";
printf("LoadLibrary(\"%s\") returned %p\n", dll, LoadLibraryA(dll));
return 0;
}
Yes, there has been: #4410. It was necessary to go forward with the OpenSSL upgrade from the version whose support will end in a few weeks from now. |
I compiled that program and got the following output (I adjusted the path used to the correct installation location which is under by user AppData\Local):
|
When I try loading with that program other libraries from under mingw64\libexec\git-core I don't get |
According to Win32 System Error Codes 0-499 126 means this:
I don't really know what that could possibly mean. |
Most likely it's because |
That doesn't help either:
|
Hmm.. When I append that path to PATH and attempt to use the test program you gave sources for to load I'll try few more things to narrow down the conditions and have more detailed information of what works and what doesn't. |
It seems that whatever I do with But when the /mingw64/libexec/git-core directory is added to One thought that just came to my mind. My username contains non-ascii character Could that non-ascii character cause the load to fail when attempted by the GfW code? |
You can find out by installing, say, Portable Git into a location that has only ASCII characters in its path. For example, you could create Another tool you could use to investigate further would be Process Monitor. But your hunch about non-ASCII characters does have a point, as the code uses the |
Verified with Portable Git:
|
Allow `libcurl-4.dll` to be located in a path containing non-ASCII characters. This fixes git-for-windows#4573. Signed-off-by: Johannes Schindelin <[email protected]>
Cool! I have a PR up to fix this: #4575 |
As of Git for Windows v2.41.0, when installed into a location whose path contains non-ASCII characters, [it was no longer possible to fetch from/push to remote repositories via https://](git-for-windows/git#4573), which [has been fixed](git-for-windows/git#4575). Signed-off-by: gitforwindowshelper[bot] <[email protected]>
I can confirm that version 2.42.0.windows.2 has fixed this problem I faced. Thank you very much! |
Setup
64-bit
Non-working 2.42.0 version:
Working older 2.39.2 version:
Windows 11 22H2, 64-bit
defaults?
to the issue you're seeing?
Somewhat hardened and restricted corporate setup. But nothing that I would imagine affecting GfW. Especially as the older 2.39.2 version doesn't have same issue.
Details
All of them fail in the same way.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
In Git Bash:
The command to be able to load libcurl successfully and complain that https://github.com is not a repository.
With 2.39.2 of GfW, the same command worked properly. Therefore, this feels like a regression.
2.41.0.3 of GfW fails in the same way as 2.42.0.
The command fails with an error about failing to load libcurl-4.dll.
URL to that repository to help us with testing?
Not related to specific repository.
Extra information
No:
In two places:
The text was updated successfully, but these errors were encountered: