-
Notifications
You must be signed in to change notification settings - Fork 15
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
Git Certificate Errors for Windows SDK Installer #487
Comments
Git clone protocol now suppose to accept http, https, git and ssh. |
I'm not sure if this is something how a ssl certificate can be set, but I found this discussion at StackOverflow. I noticed the answered command used .pem file instead of any .crt. I tried to run the commands anyway on command-line:
But I didn't found a way to determine if this actually sets the ssl certificate path or not. |
@rat-moonshine's command was close, but it needed the --global option to work for git clone. The configuration option is described here: https://git-scm.com/docs/git-config
I used these commands, and this resolved the errors I was getting in Moonshine. GIT_HOME should be changed based on the selected install directory.
I think the most straightforward solution will be to have Moonshine SDK Installer run these commands after the Git "installation" completed. This should work, but if the user installs (or previously installed) Git manually, it would also change the behavior for that copy of Git. The other options is to set the GIT_SSL_CAINFO envionment variable for each Git command executed from Moonshine. This should resolve the problem for Moonshine, but the Git installation would have limited functionality outside of Moonshine. |
So, how you suggest we should proceed, if we want to target this for 2.0 release. |
I think we should set the global configuration value when "installing" Git, using the command I listed. |
I did some tests with the branch actions on Windows. I was able to create a new branch, but the "Switch Branch" prompt did not open for me. I noticed that this error appeared on the console for either the "New Branch" or "Switch to Branch" actions.
I want to investigate this to see if it is related to the Windows Git install. If this is an unrelated error, we can move it to a separate issue. |
I confirm I able to get the same output return as reported by @JoelProminic , in my Vagrant VM. I able to get passed this problem once Moonshine ran internally the following script as suggested by Joel,
I confirm having the changes applied, I able to clone a Git repository in my Vagrant test with Moonshine without any problem. |
The above error looks like during 'push' command - a 'push' command executes after creating a new branch if 'Push newly created branch to remote' option is checked in the 'New Branch' creation popup. I couldn't able to reproduce the error @JoelProminic reported as above; I tried randomly New Branch creation and Switch Branch, in my usual Windows workstation and Vagrant VM. I also tested the functionality on macOS, so far everything ran for me expectedly. I tested the functionalities with having no-config-auth-saved environment too. (Note: In case of 'Push' action when Git credential is not present, Git opens following window on Windows Moonshine, and native login window in OSX Moonshine: However, when testing on Vagrant VM, while Seeing following auth information in Commit window: Moonshine returned console error while Commit: I'm trying to work a fix for this keeping in our current structure. |
I able to reproduce the non-existence of Thinking more on this, we can follow a short or detailed path for this. Short path: User can set the requisite information to global config file by following the given instruction in above link, and pass through the above problem. Detailed path: I can work on to make the authentication window 'automatically' showing username and email fields during a Commit action when auth value is - we'll need to do additional changes in the current procedure, we also need to add command to set user.name and user.email as there is no command exists in current Moonshine to set these. Having the above process automated, we can get rid of the 'How can I change this?' link then. |
…ay need some more thinking (reference #487)
For reference: I somehow triggered a case where .gitconfig was cleared on my Windows VM. This caused an error in Moonshine:
I was able to resolve this by deleting .gitconfig. It was recreated with the http.sslCAInfo option above. |
I ran into this issue today when trying to clone a git repository relying on git provided by moonshine sdk installer
When I installed full git bash the issue went away as it installed certificate to the path above. |
I had to deal with this issue as part of other testing last week, and I confirmed that the commands reported here still work: #487 (comment) Did we remove these commands at some point? It looks like we had this working... |
Moonshine still has those information in its temporary env-setting file:
|
I did a test with Git on Windows, using the installation from Moonshine SDK Installer (See #449). I used Vagrant to create fresh Windows VM for this test.
Unfortunately, I got an error. I reproduced the error on the command line. I tried this repository, using the default URL recommended by the project: https://github.com/prominic/XHTMLConverterCLI.git
I see that it is looking for CAfile in Program Files, rather than the actual download location. I haven't found an environment variable to customize this yet.
I was able to work around this by using a different protocol: git://github.com/prominic/XHTMLConverterCLI.git . However, by my understanding, this will prevent changes to the clone from being pushed back to the origin (since the channel is not secured).
Note that there are a couple other Git protocols that we could support (ssh:// and https:// ): https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
The text was updated successfully, but these errors were encountered: