Trust gulp-connect certificate from Visual Studio Online on Mac OS
By Anatoly Mironov
I have read and followed this awesome post:
Getting SPFx working in Visual Studio Online by SPDavid.
I got my fingers and tried that guide out. This worked good, I spent some time, though, googling (binging) around to get rid of the SSL Warnings for the remote “localhost” on my Mac.
I would like to share this simple instruction on how to trust a self signed certificate from gulp-connect on Mac OS. The implication is that the certificate is on the remote linux machine (on the Visual Studio Environment), that you are connected to through the Visual Studio Code extension.
The first step (after you have connected and set up a project) is to download the certificate. It can be found in the following directory:
/workspace/<your-spfx-project>/node\_modules/gulp-connect/certs/server.crt
Choose a folder (like Desktop or whatever) to save it to. Then double click server.crt to open it in the Keychain Access.
In the Keychain Access, locate the certificate, it will have the name “gulp-connect”. Open it and enter the “Trust” section. Under “When using this certificate” select “Always Trust”.
Keychain Access - certificate - Trust - Always Trust
After that you might need to restart the browser. But then it should stop warning you.
This certificate is trusted for this account