git error setting certificate verify location

After installing Windows on another drive and logged in the new Windows, previous Git installation drive path is changed: for my case, it's changing from D:\ to J:\

Then I updated the PATH variable to add Git path, but when running git clone using https url, following error appeared:

the CAfile location should be H:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt for current newly installed Windows, while the error information indicates it's still using the old path.


To fix it, we need modify git system config variable: http.sslcainfo

Try git clone again, it works now.