Don't show certificate error when pushing to self-hosted repositories#19149
Closed
sergiou87 wants to merge 9 commits intofix-credential-manager-proxyfrom
Closed
Don't show certificate error when pushing to self-hosted repositories#19149sergiou87 wants to merge 9 commits intofix-credential-manager-proxyfrom
sergiou87 wants to merge 9 commits intofix-credential-manager-proxyfrom
Conversation
Member
Author
|
Superseded by #19297 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #18991
Description
Some self-hosted repositories may not have a valid SSL certificate and that could be ok. Git offers the
http.sslverifyoption to disable SSL verification for all git operations, or only for git operations on certain hosts. We could use that here, but we don't want to duplicate that logic to match domains, order of preference of different options...Instead, we'll just reject all requests to
/metathat fail SSL verification. The reasoning for that is:undefinedin this function means "we don't know if this is a GitHub host or not".If we used
fetchfor this, in the case of an invalid SSL certificate Electron would dispatch a 'certificate-error' event on the main process that we must handle to allow the request to finish (in this case, by rejecting it). However, we're usinghttps.requesthere, so we don't need to handle that and can get rid of the complexity of dealing with stuff happening on the main process.Release notes
Notes: [Fixed] Don't show certificate error when pushing to self-hosted repositories