When attempting to address a different issue, I tried one the solution described here:
The one I tried:
git config --global http.sslCAinfo /bin/curl-ca-bundle.crt
Now I'm getting an error when trying to run a git command:
unable to access 'https://github.com/<my_repo>/': Problem with the SSL CA cert (path? access rights?)
How do I fix the SSL CA cert path on WSL2? What should it be pointing to?
Additional information:
git --version
git version 2.25.1
$ uname -a
Linux USC-W-C6GLQG3 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The problem is that the path you've specified is not valid. Git for Windows presents a Unix-like set of paths, but due to the nature of it running on Windows, sometimes it chooses behaviours which are un-Unix-like (such as placing shared libraries in the directory with binaries). In a real Unix system, including WSL,
/binis only for executable binaries, and would never contain configuration or data files like certificates.The solution is pretty simple: remove the entry. You can do
git config --unset-all http.sslCAInfo, which will remove this setting and use the system default. As long as you have theca-certificatespackage (on Debian or Ubuntu) or its equivalent (on other systems) and you're not using a custom CA or TLS middlebox, then everything should just work.Note that some non-default Windows antivirus software and firewalls, as well as some monitoring software and proxies, are indeed TLS-intercepting proxies, and then you have to either completely remove them from the system and reboot (disabling them is often not enough), or install an appropriate CA certificate. What that certificate should be depends on your environment and you'd need to ask your IT department what it is.