You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enterprise self-signed/untrusted certificate support #671
It's not uncommon for GitHub Enterprise instances to run with a self-signed certificate or certificate signed by a non-authorative CA. There's several reasons why that might be true. These include:
a freshly launched GHE instance like a trial
of our AWS/Azure templates which generate a self-signed certificate on launch
GHE instances which run on non TLD domains (like ghe.lan) for which no CA will give out a certificate
We need to make sure that our enterprise sign in flow can handle an untrusted certificate and present enough information that the user can make an informed decision about whether to trust it permanently. I don't know how this works on Mac, maybe it's already taken care by the system, but on Windows we're going to have to do a bit of work for this to work nicely.
First, we need a way of installing a certificate into the appropriate certificate store. Second, we need a way of keeping the curl ca-bundle file in sync with the certificate store. This all works in the current version on Desktop on Windows. The implementation for the order of certificates in the ca-bundle is rather finicky but luckily we have a reference implementation in MsysGitCertificateInstaller.cs as well as a starting point for installing certificates in the store (SystemCertificateInstaller.cs). I'm assuming this will require us to write some native helpers on Windows.
I don't know how this works on Mac, maybe it's already taken care by the system
It's fairly similar on Mac. We'd get a callback saying the certificate was not trusted, and we'd present a standard system dialog to accept or reject it. I'd be surprised if Electron already exposed those hooks so we'd probably need to do some work there.
Second, we need a way of keeping the curl ca-bundle file in sync with the certificate store.
This is also relevant to #340, right? If, e.g., Git for Windows' curl knew about the system certificate store, we'd be in fine shape.
This is also relevant to #340, right? If, e.g., Git for Windows' curl knew about the system certificate store, we'd be in fine shape.
Had a chat with @dscho about this today, and from his understanding there's no way to compile curl with support for both resolving using the certificate bundle and the Windows certificate store. But he's not looked at that area for a while, so this might have changed.
Otherwise, yes, we're porting our existing tricks from Desktop...
@zeke so far there's a few naming things that I'm working through, but I'll throw some feedback over as I get to the bottom of what's missing from the existing type declarations (it may be some false positives on our end that didn't reflect the real API).
I'm encountering a self-signed cert error when attempting to clone from Github Enterprise in 0.8.0
GitHub Desktop version: 0.8.0
OS version: Windows 10
I am now able to login, but unable to clone a repository.
Cloning into 'C:\Users\steve.gredell\Documents\GitHub\analytics-pipeline'...
fatal: unable to access 'https://<enterprise-server>/<org>/<repo-name>.git/': SSL certificate problem: self signed certificate in certificate chain
I haven't been keeping up with the Beta version, but a coworker informed me that last week he was able to login and clone from our enterprise server with no issues. Is there a way to get at older (windows) versions of Desktop Beta to test this?
Also let me know if you'd rather I make a new issue.
Activity
joshaber commentedon Nov 21, 2016
It's fairly similar on Mac. We'd get a callback saying the certificate was not trusted, and we'd present a standard system dialog to accept or reject it. I'd be surprised if Electron already exposed those hooks so we'd probably need to do some work there.
This is also relevant to #340, right? If, e.g., Git for Windows'
curlknew about the system certificate store, we'd be in fine shape.shiftkey commentedon Nov 21, 2016
Had a chat with @dscho about this today, and from his understanding there's no way to compile curl with support for both resolving using the certificate bundle and the Windows certificate store. But he's not looked at that area for a while, so this might have changed.
Otherwise, yes, we're porting our existing tricks from Desktop...
joshaber commentedon Mar 31, 2017
I have an Electron PR underway in electron/electron#9068, but I'm wondering about the security tradeoffs we're making here. I've opened https://github.com/github/desktop/issues/486 to loop in the Security team.
joshaber commentedon Apr 3, 2017
The Electron PR is now electron/electron#9099.
joshaber commentedon Apr 4, 2017
Electron PR has landed. Now we just need a new release including it.
Update to Electron 1.6.6
niik commentedon Apr 18, 2017
@shiftkey I'm tentatively re-assigning this to you since you've started to look into this.
We're not gonna be able to get anything as fancy as the native Mac view but we should pop the native windows certificate install prompt as per the Gif above. It should show automatically when attempting to install a certificate into the trusted root authorities store. That's all we're doing on Windows. I'm pretty terrible at anything C/C++ but this looks promising: https://msdn.microsoft.com/en-us/library/windows/desktop/aa382037(v=vs.85).aspx
shiftkey commentedon Apr 21, 2017
Opened the upstream PR here electron/electron#9242
shiftkey commentedon Apr 27, 2017
Moving this into M4 but it's under active development.
5 remaining items
zeke commentedon May 11, 2017
Hey sorry for the trouble.
Glad to hear it's not a blocker. We'll get it sorted.
shiftkey commentedon May 11, 2017
@zeke so far there's a few naming things that I'm working through, but I'll throw some feedback over as I get to the bottom of what's missing from the existing type declarations (it may be some false positives on our end that didn't reflect the real API).
shiftkey commentedon May 12, 2017
@joshaber given this is tied to the Electron update, do we want to push this into the beta announcement? Or should I move it to the next milestone?
joshaber commentedon May 12, 2017
Yup 👍 Moving to the next release.
sgredell commentedon Aug 21, 2017
I'm encountering a self-signed cert error when attempting to clone from Github Enterprise in 0.8.0
GitHub Desktop version: 0.8.0
OS version: Windows 10
I am now able to login, but unable to clone a repository.
I haven't been keeping up with the Beta version, but a coworker informed me that last week he was able to login and clone from our enterprise server with no issues. Is there a way to get at older (windows) versions of Desktop Beta to test this?
Also let me know if you'd rather I make a new issue.
w60001 commentedon Aug 21, 2017
I'm also seeing a regression on this in 0.8.0, which just started popping up after an auto-update to the latest GitHub Desktop version this morning.
shiftkey commentedon Aug 21, 2017
@sgredell @w60001 it looks like someone opened #2514 to track this - please add your notes there.