This "unable to get local issuer certificate" error means that Git cannot verify the authenticity of the SSL certificate provided by your remote repository's server. This often happens in corporate environments where network traffic is routed through a proxy or firewall that uses its own self-signed or private root certificate.
I
This is often the best solution for Windows users, as it tells Git to use the same certificate store as the operating system. Corporate certificates are typically pushed to the Windows store by IT departments.
Run the following command in your Command Prompt or Git Bash:
Bash
git config --global http.sslbackend schannel
This command configures Git to use Secure Channel, the native Windows SSL/TLS library, for handling HTTPS connections. After running this, restart Mendix Studio Pro and try creating the branch again.
II
If the first solution doesn't work, you can explicitly tell Git where to find the correct root certificate file. You will likely need to get this file from your IT or security department.
Obtain the root certificate file (e.g., YourCompanyRootCA.pemor YourCompanyRootCA.crt from your IT team.
Save the file in a permanent location on your computer (e.g., C:\certs\YourCompanyRootCA.pem
Configure Git to use this certificate file by running the following command. Make sure to replace the example path with the actual path to your file.
Bash
git config --global http.sslCAInfo "C:/certs/YourCompanyRootCA.pem"
Note: Use forward slashes / in the path, even on Windows.
III
This solution should only be used as a temporary workaround on a trusted network, as it disables security checks and makes your connection vulnerable to man-in-the-middle attacks.
To disable SSL verification globally for Git, run this command:
Bash
git config --global http.sslVerify false