Search code examples
visual-studiogithub-copilot

CoPilot behind Zscaler - Error on ghost text request: (FetchError) unable to get local issuer certificate


I installed CoPilot extension in Visual Studio 2022 Enterprise Edition on Windows 10 on my company computer in my home office. My company computer is shipped with Zscaler which is installed by my corporate IT. The Zscaler tunnel is enabled so that I can access my intranet.

Given this environment I tried to test CoPilot free edition so I followed the installation instructions from Getting started with GitHub Copilot

Unfortunately I get this error

[ERROR] [ghostText] [2024-01-10T16:46:40.022Z] Error on ghost text request: (FetchError) unable to get local issuer certificate

enter image description here

Obviously it has something to do with Zscaler, I am not sure what.


Solution

  • I solved this error as follows:

    • Browse to URL https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex with chrome then export the Zscaler Root CA certificate to a file e.g. C:\Data\CoPilot\CA\Zscaler Root CA.pem as shown below: enter image description here

    • Define new user or system environment variable NODE_EXTRA_CA_CERTS and set its value to the exported Zscaler certificate as shown below: enter image description here

    • Restart Visual Studio, start typing some code and check the CoPilot output enter image description here