Skip to content
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

mingw64 Error for Git Installation #92

Open
JoelProminic opened this issue Mar 30, 2022 · 10 comments
Open

mingw64 Error for Git Installation #92

JoelProminic opened this issue Mar 30, 2022 · 10 comments
Assignees
Labels
bug Something isn't working test-ready
Milestone

Comments

@JoelProminic
Copy link
Contributor

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 JoelProminic added the bug Something isn't working label Mar 30, 2022
@JoelProminic JoelProminic added this to the v4.4.0 milestone Mar 30, 2022
@JoelProminic
Copy link
Contributor Author

I found this command in Moonshine-IDE/Moonshine-IDE#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
Copy link
Contributor Author

Ah, @Aszusz found the original issue for this. Here the relevant writeup: Moonshine-IDE/Moonshine-IDE#487 (comment)

@JoelProminic
Copy link
Contributor Author

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

@JoelProminic JoelProminic modified the milestones: v4.4.0, v4.5.0 Dec 21, 2022
rat-moonshine pushed a commit to Moonshine-IDE/Moonshine-IDE that referenced this issue Jun 1, 2023
@rat-moonshine
Copy link
Collaborator

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Collaborator

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
Copy link
Contributor Author

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
Copy link
Collaborator

rat-moonshine commented Jun 9, 2023

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
Copy link
Contributor Author

JoelProminic commented Jun 14, 2023

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:

  • Set the global config value in MSDKI so that the "install" logic is together
  • Set the config value for the session only as part of the environment setup. I'll create a Moonshine issue for this (update - added). I'm not sure whether this solution is possible, but it would allow us to use the MoonshineSDK Git for Moonshine without interfering with an external installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test-ready
Projects
Development

No branches or pull requests

2 participants