-
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
"credential-cache unavailable; no unix socket support" #3892
Comments
Well, it is true. Windows does not have Unix socket support in general. As per this comment:
Now, the question is: how much are you interested in getting Git for Windows to support |
How might that work? I don't have much C experience. Is it possible to change an optional compile-time dependency to a conditional runtime dependency? Or would Git for Windows have to compile credential-cache with and without sockets, and install the appropriate copy for the system? |
It is possible to query for unix socket support at runtime and we have ways to load CRT functions at runtime if available, so that approach is theoretically feasible. |
@rimrul Do you have any examples to follow? The good news is that credential-cache is confirmed to function on Windows if compiled (thanks @carenas). |
Yes, of course. Sorry for not providing you with more actionable info on this. We have the macros You can see them in use in t/helper/test-drop-caches.c, compat/winansi.c, compat/win32/trace2_win32_process_info.c and two times in compat/mingw.c. |
@rimrul interesting. This seems slightly different. If I understand correctly, the winsock2.h What happens at runtime if you build with sockets on Windows 10 then try to run on Windows 7? According to the docs above, the socket function should return error INVALID_SOCKET (specific error code WSAGetLastError). But will the application even start? |
@hickford It won't work. Likewise if you run on older Windows 10 that lack support for |
GCM's documentation states that git's credential cache is supported on Windows. Unfortunately, due to lack of Unix socket support on Windows versions prior to Windows 10, this feature is not currently supported on Windows, so this change removes it from the list of platforms on which this credstore can be used. See [1] for more details. [1]: git-for-windows/git#3892
GCM's documentation states that git's credential cache is supported on Windows. Unfortunately, due to lack of Unix socket support on Windows versions prior to Windows 10, this feature is not currently supported on Windows, so this change removes it from the list of platforms on which this credstore can be used. See [this issue](git-for-windows/git#3892) for more details.
I did some testing. Running Git for Windows 2.43.0 built without
I think we could improve that error message with a runtime check.
|
@rimrul Exciting ideas!
Please could you share |
I could do that, but do you really want my locally built binaries that are just without |
@rimrul I can't find the credential-cache binaries in windows-artifacts.zip. |
Windows 10 build 17063 introduced support for unix sockets to Windows. bb390b1 (git-compat-util: include declaration for unix sockets in windows, 2021-09-14) introduced a way to build git with unix socket support on Windows, but you still had to decide at build time which Windows version the compiled executable was supposed to run on. We can detect at runtime wether the operating system supports unix sockets and act accordingly for all supported Windows versions. This fixes git-for-windows#3892 Signed-off-by: Matthias Aßhauer <[email protected]>
Windows 10 build 17063 introduced support for unix sockets to Windows. bb390b1 (git-compat-util: include declaration for unix sockets in windows, 2021-09-14) introduced a way to build git with unix socket support on Windows, but you still had to decide at build time which Windows version the compiled executable was supposed to run on. We can detect at runtime wether the operating system supports unix sockets and act accordingly for all supported Windows versions. This fixes git-for-windows#3892 Signed-off-by: Matthias Aßhauer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
I tried to run git-credential-cache but got an error:
Others have reported the same error https://stackoverflow.com/questions/67951554/error-fatal-credential-cache-unavailable-no-unix-socket-support
A workaround is to install and configure Git Credential Manager
git-credential-manager-core --configure
. The default credential store Windows Credential Manager works well.Setup
The text was updated successfully, but these errors were encountered: