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

前端 未结 4 1584
后悔当初
后悔当初 2020-12-06 04:01

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,

4条回答
  •  独厮守ぢ
    2020-12-06 04:55

    There is actually a better way:

    Since VS Code is built on Chromium the "proxy settings should be picked up automatically" from Google Chrome/Chromium. So if you add your self-signed certificate in Chrome/Chromium by going to:

    1. chrome://settings/privacy
    2. Manage certificates
    3. Authorities / Import
    4. Select and import your certificate (pem-file)
    5. Restart VS Code

    I was able to download VS Code extensions despite being behind a corporate proxy.

    Remark: Ubuntu 18.04 and VS Code works only with Chrome and not Chromium.

提交回复
热议问题