Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Visual Studio Code to trust our self-signed proxy certificate?

Our corporate firewall/proxy is keeping VS Code from being able to install extensions because Code doesn't trust something in the chain. It doesn't reliably give an error, but when it does, it's this: "self signed certificate in certificate chain".

This seems like it's an OpenSSL error, but I don't have enough familiarity with OpenSSL to know how to trust the certificate?

like image 257
Devin Goble Avatar asked Apr 08 '16 18:04

Devin Goble


People also ask

How do I trust a certificate in Visual Studio?

In the Certificate Import Wizard, browse to the certificate that you exported (Trusted Root Certification Authorities), and then select Place all certificates in the following store. Click Next, verify that you selected the correct certificate, and then click Finish.

How do I make my workspace trusted in VS Code?

Workspace Trust editor Click the Restricted Mode Status bar message, the Manage link in the Restricted Mode banner, the Gear menu, or open the Command Palette (F1) and use the Workspaces: Manage Workspace Trust command.


1 Answers

This is a terrible answer (not very secure), but appears to be the current Microsoft official answer. Use "http.proxyStrictSSL": false in your settings.json file.

This should work to get around the issue of installing extensions inside a corporate network, but I'd recommend disabling the setting if you are going to be working from home/coffee shop and not connected to the corporate VPN.

https://github.com/Microsoft/vscode/issues/3492

like image 55
dragon788 Avatar answered Oct 07 '22 00:10

dragon788