AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Troubleshoot GitHub Copilot Connectivity Issues and Proxy Errors in JetBrains IDEs

矢嶋雄基 · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Getting GitHub Copilot to work inside a corporate JetBrains environment can be frustrating. You install the plugin into IntelliJ IDEA, PyCharm, or GoLand, trigger code completion or open the Copilot Chat tab, and you are greeted by an unresponsive status bar, an infinite authentication spinner, or an error banner declaring: GitHub Copilot could not connect to server. Extension activation failed: "unable to verify the first certificate".

At 365Finds, we see this exact pattern repeatedly across enterprise teams. The issue is rarely that GitHub Copilot is down. In nearly nine out of ten cases, the failure occurs because the developer workstation sits behind an inspecting corporate proxy or a firewall performing SSL/TLS decryption (such as Zscaler, Netskope, or Blue Coat), and the Copilot background agent cannot establish a trusted TLS handshake.

Here is the systematic, step-by-step troubleshooting protocol 365Finds recommends to identify the root cause, fix proxy routing, supply missing certificate authorities, and restore stable GitHub Copilot connectivity in JetBrains IDEs.


1. Diagnose First: Inspect idea.log and Enable Trace Logging

Before modifying network flags blindly, check what error the Copilot language server is actually throwing. In JetBrains IDEs, the GitHub Copilot plugin outputs its diagnostic telemetry and connection traces directly into JetBrains' core idea.log.

Finding Your Log File

Enabling Verbose Trace Logging

Default logs often summarize network drops as generic socket closures. To capture the precise TLS handshake error, HTTP status code, or proxy refusal:

  1. In the top menu, navigate to Help > Diagnostic Tools > Debug Log Settings...
  2. In the dialog, add the following line on its own row:
    #com.github.copilot:trace
    
  3. Click OK.
  4. Restart your IDE or disable and re-enable the GitHub Copilot plugin in Settings > Plugins.
  5. Reproduce the connectivity error, then open idea.log and search for com.github.copilot.

Note: Once troubleshooting is complete, remove #com.github.copilot:trace from the debug log configuration to keep log files manageable.


2. Match Common Error Signatures to the Root Cause

When reviewing idea.log, you will generally encounter one of four diagnostic signatures:

Error SignatureLikely Root CauseImmediate Action
unable to verify the first certificate or self-signed certificate in certificate chainCorporate proxy performing SSL/TLS MITM inspection; background agent missing root CASupply the corporate CA bundle via OS store or NODE_EXTRA_CA_CERTS
read ETIMEDOUT or connect ETIMEDOUTOutbound port 443 blocked, proxy bypass failure, or required endpoints not allowlistedCheck HTTP proxy settings and corporate firewall allowlists
407 Proxy Authentication RequiredProxy server requires credentials not supplied or rejectedConfigure Proxy Authentication in JetBrains settings
Infinite login loop / OAuth token not savingLocal loopback port blocked or IDE token keychain corruptedSign out of GitHub in IDE, invalidate caches, and re-authenticate

3. Configure HTTP Proxy Settings in JetBrains

JetBrains provides a centralized proxy configuration panel that controls how the IDE and its plugins route outbound web traffic.

Configuring the Proxy

  1. Open settings:
    • Windows / Linux: Go to File > Settings (shortcut: Ctrl + Alt + S).
    • macOS: Go to IntelliJ IDEA (or IDE name) > Settings (shortcut: Cmd + ,).
  2. Navigate to Appearance & Behavior > System Settings > HTTP Proxy.
  3. Choose Manual proxy configuration and select HTTP.
    • Critical restriction: GitHub Copilot does not support proxy URLs starting with https://. Ensure you specify http:// or raw hostnames for the proxy host.
  4. Fill in your Host name (e.g., proxy.mycompany.internal) and Port number (e.g., 8080).
  5. If your network requires authentication, tick Proxy authentication and enter your corporate login and password.
  6. In the No proxy for field, specify any internal corporate domains or local loopback addresses (localhost, 127.0.0.1) separated by commas.
  7. Click the Check connection button at the bottom, enter https://github.com, and click OK. If the check succeeds, click Apply and OK.

4. Fix SSL and Corporate Certificate Inspection Errors

This is where most enterprise engineers get stuck. Even after the IDE passes the "Check connection" test, GitHub Copilot continues to fail with unable to verify the first certificate.

Why does this happen? The JetBrains IDE itself runs on Java (the JetBrains Runtime), which can read certificates imported into its internal keystore. However, GitHub Copilot operates an out-of-process language server based on Node.js. That language server has its own TLS certificate resolution logic.

Method A: Ensure Corporate CA is in the OS Trust Store

GitHub Copilot queries the local host operating system's native certificate store:

Ensure your corporate IT security root and intermediate CA certificates are installed in these system stores. If your machine is managed by company MDM (InTune, Jamf), verify that the certificate profile has synced.

Method B: Provide the CA Bundle via NODE_EXTRA_CA_CERTS (Recommended Fix)

When the background agent fails to pick up the OS trust store automatically, the most reliable fix is passing your company's PEM-formatted root certificate bundle directly to Node.js via an environment variable.

  1. Export your corporate root and intermediate CA certificates into a single .pem file (e.g., C:\certs\company-ca-bundle.pem or /Users/username/certs/company-ca-bundle.pem).
  2. Define the environment variable:
    • Windows: Open System Properties > Environment Variables, and under User or System variables, add:
      • Variable name: NODE_EXTRA_CA_CERTS
      • Variable value: C:\certs\company-ca-bundle.pem
    • macOS / Linux: Add to ~/.zshrc or ~/.bashrc:
      export NODE_EXTRA_CA_CERTS="/path/to/company-ca-bundle.pem"
      
      Note for macOS GUI apps: Launching JetBrains IDE from the Dock or Spotlight does not always inherit terminal shell variables. Launch the IDE from terminal (open -a "IntelliJ IDEA") or configure environment variables globally using launchctl setenv NODE_EXTRA_CA_CERTS /path/to/company-ca-bundle.pem.
  3. Completely restart the JetBrains IDE.

Method C: Import into JetBrains Server Certificates

Go to Settings > Appearance & Behavior > System Settings > Server Certificates. Under Custom Certificates, click the + (Add) icon and select your company root CA file (.crt or .pem).

The Temporary Diagnostic Check: Bypassing Validation

In Settings > Appearance & Behavior > System Settings > Server Certificates, there is a checkbox: Accept non-trusted certificates automatically.

At 365Finds, our view is pragmatic: using this setting to test whether an error is strictly caused by certificates is fine. If checking this box immediately resolves the Copilot connection, you have confirmed that certificate verification is the culprit. However, do not leave this permanently enabled in production. Disabling certificate validation breaks end-to-end TLS integrity and exposes internal code snippets to man-in-the-middle exploits. Once verified, import the proper CA bundle and uncheck the box.


5. Environment Variable Routing and Precedence

If you do not configure a proxy inside the JetBrains GUI, GitHub Copilot automatically searches for standard proxy environment variables. It evaluates them in this strict order:

  1. HTTPS_PROXY
  2. https_proxy
  3. HTTP_PROXY
  4. http_proxy

Unlike standard UNIX tool chains where HTTP_PROXY handles plain HTTP and HTTPS_PROXY handles SSL, GitHub Copilot selects the single highest-priority variable found and routes both HTTP and HTTPS traffic through it.

If your corporate proxy requires inline credentials:

export HTTPS_PROXY="http://username:password@proxy.corporate.internal:8080"

If your password contains special characters (such as @, :, #, or /), you must URL-encode them (for example, replace @ with %40). Failure to URL-encode credentials causes parser crashes in the Copilot agent socket.


6. Corporate Firewall and Endpoint Allowlisting

If your proxy settings and certificates are correctly configured but Copilot still drops connections with ETIMEDOUT or ECONNRESET, your company firewall or deep-packet inspection (DPI) gateway may be blocking required domains or terminating persistent WebSocket tunnels.

Enterprise network administrators must allowlist the following endpoints on port 443:

Additionally, verify that your corporate proxy allows HTTP upgrade requests for WebSockets (wss://). GitHub Copilot Chat and streaming code suggestions rely on continuous bidirectional streaming; proxies that aggressively sever long-lived socket connections will cause completions to stall halfway through generation.


7. Fixing Authentication Loops and Token Corruption

Occasionally, network dropouts corrupt the local OAuth session, leading to an endless sign-in loop where the browser reports successful login, but JetBrains never updates the Copilot status.

When this occurs:

  1. In the bottom-right status bar of your JetBrains IDE, click the GitHub Copilot icon and select Sign out of GitHub.
  2. Go to Settings > Version Control > GitHub, remove any existing GitHub accounts, and click Apply.
  3. Go to File > Invalidate Caches..., select Clear file system cache and Local History, and click Invalidate and Restart.
  4. Upon reboot, click the Copilot icon in the status bar and select Sign in to GitHub to generate a fresh device code.

365Finds Summary Recommendation

When troubleshooting GitHub Copilot in JetBrains IDEs behind enterprise infrastructure, 365Finds recommends addressing the problem in this exact sequence:

  1. Enable #com.github.copilot:trace in Debug Log Settings to inspect the real network error in idea.log.
  2. Confirm that your proxy uses an http:// URL scheme rather than https:// in JetBrains HTTP Proxy settings.
  3. If the error mentions unable to verify the first certificate, set the NODE_EXTRA_CA_CERTS environment variable to point to your corporate root CA bundle and restart the IDE.
  4. Ensure your corporate network team has allowlisted copilot-proxy.githubusercontent.com and explicitly enabled WebSocket protocol upgrading.

References