Moonshine-IDE / Moonshine-SDK-Installer

To take full advantage of Moonshine IDE you will need third party SDKs like Apache® Flex or Apache® Royale. In order to make it easier for you to setup the required SDKs, we created the Moonshine SDK Installer.
https://moonshine-ide.com/download-sdk-installer/
Other
8 stars 2 forks source link

mingw64 Error for Git Installation #92

Open JoelProminic opened 2 years ago

JoelProminic commented 2 years ago

I tried cloning a project on Windows using Git installed from MSDKI, and I got this error:

: fatal: unable to access 'https://github.com/Moonshine-IDE/DominoAPILocalExample.git/': error setting certificate verify locations:  CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none

This error looks familiar to me, but I haven't found an issue for it.

JoelProminic commented 2 years ago

I found this command in https://github.com/Moonshine-IDE/Moonshine-IDE/issues/739

%GIT_HOME%\bin\git config --global http.sslCAInfo %GIT_HOME%\mingw64\ssl\cert.pem

Are we still running this git config command on Windows?

JoelProminic commented 2 years ago

Ah, @Aszusz found the original issue for this. Here the relevant writeup: https://github.com/Moonshine-IDE/Moonshine-IDE/issues/487#issuecomment-475025372

JoelProminic commented 2 years ago

This wasted a lot of time for me again when testing today.

Testing with a fresh Windows VM, I installed Git and got this error:

image

I tried the previous fix and still got an error.

I found a slightly different solution here, and this worked for me.

# This path should be based on the path the MSDKI uses for GIT
set GIT_HOME=C:\MoonshineSDKs\Git\git-2.30.1
# This command uses the `.crt` instead of the `.pem`.  Also note that the directory is different 
%GIT_HOME%\bin\git config --global http.sslCAInfo %GIT_HOME%\mingw64\ssl\certs\ca-bundle.crt
rat-moonshine commented 1 year ago

I have updated the temp-environment-setup command to match this:

%GIT_HOME%\bin\git config --global http.sslCAInfo %GIT_HOME%\mingw64\ssl\certs\ca-bundle.crt

Please, check.

JoelProminic commented 1 year ago

I didn't get any errors for the new install, but I had already set the global configuration. I'll retest this on a fresh Windows instance when I have a chance.

JoelProminic commented 1 year ago

I did a test with MSDKI 4.5.0 build 414 (downloaded from the development builds on moonshine-ide.com) on a fresh Windows 11 machine, and I found that I still got the same error:

image

fatal: unable to access 'https://github.com/Moonshine-IDE/Moonshine-IDE/', error setting certificate verify locations:  CAfile: C:/Program Files/Git/mingw64/ssl/certis/ca-bundle.crt CApath: none

I checked the command line and confirmed that the global config values for http.sslCAInfo was not set.

rat-moonshine commented 1 year ago

So I rechecked the generated .cmd file that we use to set temporary environment on Windows, and I see the command generated in expected way:

set DYLD_LIBRARY_PATH=^C^:^\^M^o^o^n^s^h^i^n^e^S^D^K^s^\^H^a^x^e^\^n^e^k^o^-^2^.^3^.^0
set PATH=%FLEX_HOME%\bin;%AIR_SDK_HOME%\bin;%JAVA_HOME%\bin;%ANT_HOME%\bin;%MAVEN_HOME%\bin;%GRADLE_HOME%\bin;%GRAILS_HOME%\bin;%HAXE_HOME%;%NEKO_HOME%;%VIRTUALBOX_HOME%;%DYLD_LIBRARY_PATH%;%PATH%
"%GIT_HOME%\bin\git" config --global http.sslCAInfo "%GIT_HOME%\mingw64\ssl\certs\ca-bundle.crt"

When I ran the file on command-line manually, it didn't shown any warning/problem either. I wonder where it's breaking..

image

JoelProminic commented 1 year ago

You can check the global config like this: "%GIT_HOME%\bin\git" config --global http.sslCAInfo. I confirmed this wasn't set after the installation.

I retested this today by:

  1. Removing any existing global config value (i.e set manually) like this: "%GIT_HOME%\bin\git" config --global http.sslCAInfo ""
  2. Delete or Rename C:\MoonshineSDKs\Git
  3. Reinstall Git from MSDKI
  4. Check the global config value with "%GIT_HOME%\bin\git" config --global http.sslCAInfo. BUG: it was not set. The log didn't show any obvious problems.

image

rat-moonshine commented 1 year ago

I think we're talking about two different places here.

MSDKI never setup %GIT_HOME%\bin\git config --global http.sslCAInfo configuration but Moonshine-IDE. I changed in the temporary environment generation command in Moonshine-IDE that match the newer sslCAInfo setup command. I don't expect this to be update after MSDKI Git installation.

I re-tested Moonshine-IDE generated .cmd environment-setup file, and this seems properly setup the sslCAInfo value, when tested on a command-prompt:

image

JoelProminic commented 1 year ago

I retested this with Moonshine Development 3.3.4 Build 1399, and I confirmed that the global config value is not set and the ming64 error still triggers.

For now, I bumped this issue to the next release. My preference would be to either: