Failed to list available models due to duplicate CA certificates from combined system and bundled certs
Describe the bug
whatever i ask, always show this error
Affected version
0.0.373 Commit: 1f9ed04
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
Thank you for raising this issue, @a1mersnow š I'd like your help gathering more information to help me troubleshoot what is going on here and getting you unblocked.
Specifically, I would appreciate you running the following command and sharing 1) the console output and 2) relevant log details around retrieving models:
copilot --log-level all --log-dir copilot-cli-869
2026-01-02T14:08:11.511Z [INFO] Starting Copilot CLI: 0.0.373
Commit: 1f9ed04
2026-01-02T14:08:11.511Z [INFO] Node.js version: v24.11.1
2026-01-02T14:08:11.590Z [INFO] Login status unknown
2026-01-02T14:08:11.593Z [INFO] Remote session access enabled
2026-01-02T14:08:11.593Z [DEBUG] No auth info available, skipping custom agents load
2026-01-02T14:08:11.598Z [INFO] Logged in as user: a1mersnow
2026-01-02T14:08:12.601Z [DEBUG] Fetched Copilot URL for a1mersnow from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-02T14:08:12.601Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.373 (darwin v24.11.1) term/iTerm.app
2026-01-02T14:08:12.649Z [DEBUG] Fetched Copilot URL for a1mersnow from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-02T14:08:12.649Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2026-01-02T14:08:12.649Z [LOG] Creating MCP client for github-mcp-server...
2026-01-02T14:08:12.652Z [LOG] Connecting MCP client for github-mcp-server...
2026-01-02T14:08:13.494Z [LOG] MCP transport for github-mcp-server closed
2026-01-02T14:08:13.494Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2026-01-02T14:08:13.495Z [LOG] GitHub MCP server configured after authentication
2026-01-02T14:08:16.957Z [INFO] No update needed, current version is 0.0.373, fetched latest release is v0.0.373
2026-01-02T14:08:21.471Z [DEBUG] Detected mentions:
2026-01-02T14:08:22.156Z [DEBUG] Fetched Copilot URL for a1mersnow from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-02T14:08:22.645Z [DEBUG] Fetched Copilot URL for a1mersnow from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-02T14:08:22.645Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.373 (darwin v24.11.1) term/iTerm.app
2026-01-02T14:08:24.989Z [DEBUG] Detected mentions:
2026-01-02T14:08:25.472Z [DEBUG] Fetched Copilot URL for a1mersnow from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-02T14:08:25.472Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.373 (darwin v24.11.1) term/iTerm.app
It seems to be a problem with the network. I don't know...
Had the same message for a short while today, guessing it is GH API related
It's weird! When I set the proxy to a MitmProxy (I want to intercept and debug the request), it works!
It's weird! When I set the proxy to a MitmProxy (I want to intercept and debug the request), it works!
Thanks for the additional details, @a1mersnow š¤ Are you using copilot on a corporate network or VPN that has proxying requirements or perhaps is blocking Copilot Individual subscriptions?
At the least, this highlights an opportunity to improve the error messaging and logging when unable to make HTTP connections for GitHub MCP server and talking to Copilot API.
In the mean time, NODE_DEBUG=http,https,undici copilot should provide lower-level HTTP logs. I'd be interested if any connections are being refused or if there is something else going on.
Expand for snippet from my copilot logs for comparison
2026-01-05T13:33:28.041Z [INFO] Starting Copilot CLI: 0.0.374
Commit: 9fecd24
2026-01-05T13:33:28.041Z [INFO] Node.js version: v24.11.1
2026-01-05T13:33:28.284Z [INFO] Login status unknown
2026-01-05T13:33:28.287Z [INFO] Remote session access enabled
2026-01-05T13:33:28.287Z [DEBUG] No auth info available, skipping custom agents load
2026-01-05T13:33:28.294Z [INFO] Logged in as user: andyfeller
2026-01-05T13:33:28.657Z [DEBUG] Fetched Copilot URL for andyfeller from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2026-01-05T13:33:28.680Z [DEBUG] Fetched Copilot URL for andyfeller from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2026-01-05T13:33:28.680Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.374 (darwin v24.11.1) term/Apple_Terminal
2026-01-05T13:33:28.785Z [DEBUG] Successfully listed 33 models
2026-01-05T13:33:28.921Z [DEBUG] Fetched Copilot URL for andyfeller from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2026-01-05T13:33:28.921Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.374 (darwin v24.11.1) term/Apple_Terminal
2026-01-05T13:33:28.958Z [DEBUG] Successfully listed 33 models
2026-01-05T13:33:28.991Z [DEBUG] Fetched Copilot URL for andyfeller from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2026-01-05T13:33:28.991Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.enterprise.githubcopilot.com/mcp/readonly
2026-01-05T13:33:28.991Z [LOG] Creating MCP client for github-mcp-server...
2026-01-05T13:33:28.991Z [LOG] Connecting MCP client for github-mcp-server...
2026-01-05T13:33:29.012Z [DEBUG] str_replace_editor: default options: {
"truncateBasedOn": "tokenCount",
"truncateStyle": "middle"
}
2026-01-05T13:33:29.125Z [LOG] MCP client for github-mcp-server connected, took 134ms
2026-01-05T13:33:29.125Z [LOG] Started MCP client for remote server github-mcp-server
2026-01-05T13:33:29.125Z [LOG] GitHub MCP server configured after authentication
2026-01-05T13:33:29.182Z [DEBUG] Loading tools for client: github-mcp-server
2026-01-05T13:33:29.259Z [DEBUG] Adding tool: github-mcp-server-actions_get
2026-01-05T13:33:29.259Z [DEBUG] Adding tool: github-mcp-server-actions_list
2026-01-05T13:33:29.259Z [DEBUG] Skipping tool get_code_scanning_alert for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-get_commit
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-get_copilot_space
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-get_file_contents
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-get_job_logs
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool get_label for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool get_latest_release for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool get_release_by_tag for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool get_secret_scanning_alert for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool get_tag for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-issue_read
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-list_branches
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_code_scanning_alerts for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-list_commits
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_copilot_spaces for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_issue_types for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-list_issues
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-list_pull_requests
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_releases for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_secret_scanning_alerts for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Skipping tool list_tags for client github-mcp-server
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-pull_request_read
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-search_code
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-search_issues
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-search_pull_requests
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-search_repositories
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-search_users
2026-01-05T13:33:29.260Z [DEBUG] Adding tool: github-mcp-server-web_search
2026-01-05T13:33:29.260Z [DEBUG] str_replace_editor: default options: {
"truncateBasedOn": "tokenCount",
"truncateStyle": "middle"
}
2026-01-05T13:33:33.162Z [INFO] No update needed, current version is 0.0.374, fetched latest release is v0.0.374
2026-01-05T13:33:34.637Z [DEBUG] Detected mentions:
2026-01-05T13:33:34.639Z [DEBUG] str_replace_editor: default options: {
"truncateBasedOn": "tokenCount",
"truncateStyle": "middle"
}
2026-01-05T13:33:34.639Z [INFO]
2026-01-05T13:33:34.639Z [DEBUG] Using model: claude-sonnet-4.5
@andyfeller, here is what I have š if I run NODE_DEBUG=http,https,undici copilot --log-level all --log-dir copilot-cli-869
Copilot logs
2026-01-05T15:50:47.339Z [INFO] Starting Copilot CLI: 0.0.373
Commit: 1f9ed04
2026-01-05T15:50:47.339Z [INFO] Node.js version: v24.12.0
2026-01-05T15:50:47.420Z [INFO] Login status unknown
2026-01-05T15:50:47.450Z [INFO] Remote session access enabled
2026-01-05T15:50:47.450Z [DEBUG] No auth info available, skipping custom agents load
2026-01-05T15:50:47.451Z [ERROR] Error checking for updates: TypeError: Cannot read properties of undefined (reading 'paths')
2026-01-05T15:50:47.455Z [INFO] Logged in as user: lvitaly
2026-01-05T15:50:47.856Z [DEBUG] Fetched Copilot URL for lvitaly from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-05T15:50:47.857Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.373 (darwin v24.12.0) term/iTerm.app
2026-01-05T15:50:47.869Z [DEBUG] Fetched Copilot URL for lvitaly from https://api.github.com/graphql: 200 https://api.individual.githubcopilot.com
2026-01-05T15:50:47.870Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2026-01-05T15:50:47.870Z [LOG] Creating MCP client for github-mcp-server...
2026-01-05T15:50:47.874Z [LOG] Connecting MCP client for github-mcp-server...
2026-01-05T15:50:48.150Z [LOG] MCP transport for github-mcp-server closed
2026-01-05T15:50:48.150Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2026-01-05T15:50:48.150Z [LOG] GitHub MCP server configured after authentication
UNDICI logs
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: connected to api.github.com using https:h2
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: sending request to POST https://api.github.com/graphql
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: connecting to api.individual.githubcopilot.com using https:undefined
UNDICI 34548: connecting to api.individual.githubcopilot.com using https:undefined
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: trailers received from POST https://api.github.com/graphql
UNDICI 34548: connecting to api.individual.githubcopilot.com using https:undefined
UNDICI 34548: connecting to api.individual.githubcopilot.com using https:undefined
UNDICI 34548: connection to api.individual.githubcopilot.com using https:undefined errored - unable to get issuer certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
UNDICI 34548: connection to api.individual.githubcopilot.com using https:undefined errored - unable to get issuer certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
And I don't have connectivity issues (vpn, proxy). Get a pretty valid response in curl.
curl -v https://api.individual.githubcopilot.com/mcp/readonly
* Host api.individual.githubcopilot.com:443 was resolved.
* IPv6: (none)
* IPv4: 140.82.114.22
* Trying 140.82.114.22:443...
* Connected to api.individual.githubcopilot.com (140.82.114.22) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
* subject: CN=*.individual.githubcopilot.com
* start date: Apr 8 00:00:00 2025 GMT
* expire date: Apr 8 23:59:59 2026 GMT
* subjectAltName: host "api.individual.githubcopilot.com" matched cert's "*.individual.githubcopilot.com"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://api.individual.githubcopilot.com/mcp/readonly
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: api.individual.githubcopilot.com]
* [HTTP/2] [1] [:path: /mcp/readonly]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
> GET /mcp/readonly HTTP/2
> Host: api.individual.githubcopilot.com
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/2 401
< content-security-policy: default-src 'none'; sandbox
< content-type: text/plain; charset=utf-8
< strict-transport-security: max-age=31536000
< www-authenticate: Bearer error="invalid_request", error_description="No access token was provided in this request", resource_metadata="https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/readonly"
< x-content-type-options: nosniff
< date: Mon, 05 Jan 2026 16:21:00 GMT
< content-length: 51
< x-github-backend: Kubernetes
< x-github-request-id: EB47:C3621:53BDD9:5F5945:695BE4EC
<
bad request: missing required Authorization header
* Connection #0 to host api.individual.githubcopilot.com left intact
I am having the very same issue, at first i thought that was something related to MDM or some ssl/proxy intercepts, but nothing on the system is doing that.
The issue was introduced in version 0.0.370. Version 0.0.369 works, 0.0.370 and later fail.
The key difference: up to 0.0.369, the CLI prompted for keychain access to read certificates from the macOS login keychain.
Starting from 0.0.370, this prompt no longer appears and the CLI fails to validate the certificate chain for api.business.githubcopilot.com.
0.0.369 works (prompts for keychain access):
$ NODE_DEBUG=undici npx @github/[email protected] -p "hello world"
UNDICI: connected to api.business.githubcopilot.com using https:h2
UNDICI: received response to GET https://api.business.githubcopilot.com/models - HTTP 200
UNDICI: received response to POST https://api.business.githubcopilot.com/chat/completions - HTTP 200
0.0.370 fails (no keychain prompt):
$ NODE_DEBUG=undici npx @github/[email protected] -p "hello world"
UNDICI: connected to api.github.com using https:h2
UNDICI: received response to POST https://api.github.com/graphql - HTTP 200
UNDICI: connection to api.business.githubcopilot.com errored - unable to get issuer certificate
Requests to api.github.com succeed but api.business.githubcopilot.com fails. They use different intermediate CAs:
api.github.com- Sectigo ECC (works)api.business.githubcopilot.com- Sectigo RSA (fails)
Both are legitimate certs, same root CA (AAA Certificate Services). curl and openssl validate them fine.
Environment:
- macOS 15.x
- No proxy, no VPN, no SSL inspection
Workaround:
mkdir -p ~/.ssl
security find-certificate -a -p /Library/Keychains/System.keychain > ~/.ssl/ca-bundle.pem
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> ~/.ssl/ca-bundle.pem
export NODE_EXTRA_CA_CERTS="$HOME/.ssl/ca-bundle.pem"
Looks like something changed in 0.0.370 that removed or broke the keychain integration on macOS.
@andyfeller, here is what I have š if I run
NODE_DEBUG=http,https,undici copilot --log-level all --log-dir copilot-cli-869
@lvitaly : The most interesting log events are the following:
UNDICI 34548: connection to api.individual.githubcopilot.com using https:undefined errored - unable to get issuer certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
UNDICI 34548: connection to api.individual.githubcopilot.com using https:undefined errored - unable to get issuer certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
I know 0.0.370 shipped support for loading CA certificates from system and environment variables (NODE_EXTRA_CA_CERTS, SSL_CERT_FILE, CURL_CA_BUNDLE) so I would expect copilot to just pick up on them though I believe https://github.com/github/copilot-cli/issues/333 touches on some places on Mac OS that could also contain certificates.
And I don't have connectivity issues (vpn, proxy). Get a pretty valid response in curl.
curl -v https://api.individual.githubcopilot.com/mcp/readonly
For testing SSL/TLS connectivity, I like running openssl s_client -connect api.individual.githubcopilot.com:443; see below for example
Expand for openssl s_client example
$ openssl s_client -connect api.individual.githubcopilot.com:443
Connecting to 140.82.114.21
CONNECTED(00000005)
depth=2 C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
verify return:1
depth=1 C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN=*.individual.githubcopilot.com
verify return:1
---
Certificate chain
0 s:CN=*.individual.githubcopilot.com
i:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
a:PKEY: RSA, 4096 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Apr 8 00:00:00 2025 GMT; NotAfter: Apr 8 23:59:59 2026 GMT
1 s:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
i:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
a:PKEY: RSA, 2048 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Nov 2 00:00:00 2018 GMT; NotAfter: Dec 31 23:59:59 2030 GMT
2 s:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
i:C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA Certificate Services
a:PKEY: RSA, 4096 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Mar 12 00:00:00 2019 GMT; NotAfter: Dec 31 23:59:59 2028 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHZDCCBkygAwIBAgIRAPhEj0GyA9x6QG+9Zm3PufgwDQYJKoZIhvcNAQELBQAw
gY8xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UE
AxMuU2VjdGlnbyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBD
QTAeFw0yNTA0MDgwMDAwMDBaFw0yNjA0MDgyMzU5NTlaMCkxJzAlBgNVBAMMHiou
aW5kaXZpZHVhbC5naXRodWJjb3BpbG90LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBAL8JeGnE87ql2LpEVExd3sKZBUDmIxMUCBZj9QTEXXMZxELM
s5KOnRJ+tJLDWLh3fARdKrwEEtJWV7U/UxWTH1ItSgyhw5SeV9Ch6NbuEEgpmwtv
g/j168If2p5FXydlWPkSQh1nV4VwSBs/mTYHZbi9PgmczA6v90swioisw+6rTUsz
mgnbqM37XEI4BFUch2PyVTf91sRVzJDBwwNfIYseUqwUOOeg420VuXpcgugVd0YK
RUwoTkgxh4KOIKYJKko39KQKD9JHoIzIKDoy9dux/g7KdKYXwO9GQPuR+SpyhfIi
p0+AF0dMg5vBuL3+fqrE8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gqTQGRqs4tcjEPrs5dcEEtJUzH1AAA
AZYStGKkAAAEAwBHMEUCIQCFGXrwpnX2ZGSPdL+6WaWoQk1G7miuf7p/QTEGipLD
ewIgfkC5kA+f8gAmGvs3yTD1Vcjb6Jg3Mz8QbWR/xpPSJ5gAdgAOV5S8866pPjMb
LJkHs/eQ35vCPXEyJd0hqSWsYcVOIQAAAZYStGKlAAAEAwBHMEUCIQClkM9bh3tj
kv0ilqOGy+FwdhHAZDovhlJq7V2vvRd1ggIgJJrlM8azyFrbdvr/gzea7aoWbd/O
SZLMURRIB3+MZrAwRwYDVR0RBEAwPoIeKi5pbmRpdmlkdWFsLmdpdGh1YmNvcGls
b3QuY29tghxpbmRpdmlkdWFsLmdpdGh1YmNvcGlsb3QuY29tMA0GCSqGSIb3DQEB
CwUAA4IBAQB5o6/7HSqflCyD88x8h9FcCYAYiic8gm4pTX4ucv6zP4LP9CHtxWCN
s7b1SwZEh83Xb3huOXPCZpwWt6JEmkQdEegcNpFET0jTTJf/FbCIRY3uIw/mSRxk
mZfqN1N3VJPcGPGiqmmZz2t33DAIQeYsDOzUVIZw2cHM1pjLVgIyUuGJCGURPyf/
86CqjNt3D3abuJ6OV9ywcqS4SXObcWosXFKa6B2dQ8RSmWdWc/4GgIj+q4ZPOBu1
Es00WQqMmUKyemdyTE9XBmhAnERHBMaABmtCWIzt0V/SQTfHBXPehFG4b8cJssc7
jrwIwjDE5R63VA4a+cwejqG0cy/K/OvZ
-----END CERTIFICATE-----
subject=CN=*.individual.githubcopilot.com
issuer=C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 5678 bytes and written 1629 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Protocol: TLSv1.3
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: 5DBFF18D601C9F6311221B357418A8E0A40E87E1DF850A3E7602B6B3B486A7D1
Session-ID-ctx:
Resumption PSK: A4811E0D9BD85BD7B21F74E7498E8AB56EAE8CC6208487E2E3823ED79363D577
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 73 20 ba 1e df b4 ac c7-fd 93 aa 0c cb fe c9 91 s ..............
0010 - 8d 6d 90 05 ec 9b c1 53-fc 30 d7 9d db 34 96 8a .m.....S.0...4..
Start Time: 1767645314
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: 7EA9CBEC021745041C4EBDC8C48A51679CDBF7883C090F1801F49AAF70A051A5
Session-ID-ctx:
Resumption PSK: 7F12DDF9D99B7371B4D7E1707EF6A394695428FFAA236807FACA7C96E3F49C6A
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - b6 66 0a 38 54 d2 bb b0-93 01 cb b4 e4 8f 88 4c .f.8T..........L
0010 - 43 32 9f 7e 4a 7c 59 e3-b2 7d b2 36 11 52 67 22 C2.~J|Y..}.6.Rg"
Start Time: 1767645314
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
After deeper investigation, here's what I found. Since the code is not open source, this is based on reverse engineering the minified bundle, so take it with a grain of salt.
Copilot CLI appears to embed Node.js v24.11.1
The copilot binary is ~134MB and from the debug logs it seems to include an embedded Node.js runtime:
2026-01-05T23:39:50.301Z [INFO] Node.js version: v24.11.1
The changelog for 0.0.370 mentions: "Load CA certificates from system and environment variables"
Looking at the minified index.js, I found what appears to be the relevant code (around byte 14791063):
typeof jv.setDefaultCACertificates=="function" && jv.setDefaultCACertificates(Wfa())
And Wfa() seems to load certificates from multiple sources:
function Wfa(){
let t=["NODE_EXTRA_CA_CERTS","SSL_CERT_FILE","CURL_CA_BUNDLE"].flatMap(Efa);
return typeof jv.getCACertificates=="function"
? [...t,...jv.getCACertificates(),...jv.getCACertificates("system"),...jv.getCACertificates("bundled"),...jv.getCACertificates("extra")]
: [...t,...jv.rootCertificates]
}
This code was not present in v0.0.369.
So the issue seems to be in tls.setDefaultCACertificates() itself
I was able to reproduce the problem with plain Node.js (v25.2.1 on my system):
const tls = require('tls');
const certs = [
...tls.getCACertificates(),
...tls.getCACertificates('system'),
...tls.getCACertificates('bundled'),
...tls.getCACertificates('extra')
];
console.log('Total certs:', certs.length); // 301
tls.setDefaultCACertificates(certs);
// This FAILS with UNABLE_TO_GET_ISSUER_CERT
fetch('https://api.business.githubcopilot.com')
.then(r => console.log('OK:', r.status))
.catch(e => console.log('ERR:', e.cause.code));
Without calling setDefaultCACertificates() it works fine:
// This SUCCEEDS
fetch('https://api.business.githubcopilot.com')
.then(r => console.log('OK:', r.status));
// Output: OK: 404
It looks like this might be a bug in Node.js's tls.setDefaultCACertificates() API rather than in Copilot CLI itself - calling it with valid certificates (including all bundled ones) seems to break TLS validation for certain certificate chains.
@paolomainardi : Thank you for investing the time to dig deeper into what is going on here! ⨠The logic you mention is essentially on point, however I suspect there is something more to the certificates being sourced rather than a bug in tls.setDefaultCACertificates š¤
Questions
-
Could you share the output from the following commands?
openssl s_client -connect api.individual.githubcopilot.com:443 security find-certificate -a -c "AAA Certificate Services" /System/Library/Keychains/SystemRootCertificates.keychain security find-certificate -a -c "USERTrust RSA Certification Authority" /System/Library/Keychains/SystemRootCertificates.keychain -
Could you run the
diagnosis.mjsscript in the collapsed details below?
Thoughts
Continuing on your thought from https://github.com/github/copilot-cli/issues/869#issuecomment-3711278787, I'm wondering what is different about our respective system certificate setups to allow copilot to work for me but fail for you š¤
The Keychain Access prompt you mentioned was for reading the secured OAuth token to authenticate with GitHub APIs, not certificates.
Building on your sample, the following diagnosis.mjs script tries the various GitHub API endpoints before and after overriding the default CA certificates. In attempting to reproduce this, I suspect the intermediate CA certificate is missing from your system.
$ nvm use 24.11.1
Now using node v24.11.1 (npm v11.6.2)
$ node diagnosis.mjs
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā CA Certificate Diagnostic for GitHub Copilot CLI Issue #869 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Node.js version: v24.11.1
Platform: darwin arm64
āāā Certificate Sources āāā
default (getCACertificates()): 146 certificates
system: 9 certificates
bundled: 146 certificates
extra: 0 certificates
āāā Required Root CA Check āāā
USERTrust RSA Certification Authority: ā FOUND
AAA Certificate Services: ā MISSING
āāā Connection Test (without setDefaultCACertificates) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Connection Test (with setDefaultCACertificates - mimics copilot) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Summary āāā
If connections fail ONLY after setDefaultCACertificates, the issue is
likely a Node.js bug. Check: https://github.com/nodejs/node/issues
If you have corporate/VPN certificates in "system", that may be why
it works for you but not for others.
$ nvm use 25
Now using node v25.2.1 (npm v11.6.2)
$ node diagnosis.mjs
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā CA Certificate Diagnostic for GitHub Copilot CLI Issue #869 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Node.js version: v25.2.1
Platform: darwin arm64
āāā Certificate Sources āāā
default (getCACertificates()): 146 certificates
system: 9 certificates
bundled: 146 certificates
extra: 0 certificates
āāā Required Root CA Check āāā
USERTrust RSA Certification Authority: ā FOUND
AAA Certificate Services: ā MISSING
āāā Connection Test (without setDefaultCACertificates) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Connection Test (with setDefaultCACertificates - mimics copilot) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Summary āāā
If connections fail ONLY after setDefaultCACertificates, the issue is
likely a Node.js bug. Check: https://github.com/nodejs/node/issues
If you have corporate/VPN certificates in "system", that may be why
it works for you but not for others.
Expand for diagnosis.mjs script
import tls from 'node:tls';
import crypto from 'node:crypto';
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā');
console.log('ā CA Certificate Diagnostic for GitHub Copilot CLI Issue #869 ā');
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n');
console.log('Node.js version:', process.version);
console.log('Platform:', process.platform, process.arch);
console.log('');
// 1. Check certificate sources
console.log('āāā Certificate Sources āāā');
const sources = {
'default (getCACertificates())': tls.getCACertificates?.() || [],
'system': tls.getCACertificates?.('system') || [],
'bundled': tls.getCACertificates?.('bundled') || [],
'extra': tls.getCACertificates?.('extra') || [],
};
for (const [name, certs] of Object.entries(sources)) {
console.log(` ${name}: ${certs.length} certificates`);
}
// 2. Check for the required root CA
console.log('\nāāā Required Root CA Check āāā');
const allCerts = Object.values(sources).flat();
const uniqueCerts = [...new Set(allCerts)];
let hasUSERTrust = false;
let hasAAA = false;
for (const pem of uniqueCerts) {
try {
const cert = new crypto.X509Certificate(pem);
if (cert.subject.includes('USERTrust RSA Certification Authority')) {
hasUSERTrust = true;
}
if (cert.subject.includes('AAA Certificate Services')) {
hasAAA = true;
}
} catch {}
}
console.log(` USERTrust RSA Certification Authority: ${hasUSERTrust ? 'ā FOUND' : 'ā MISSING'}`);
console.log(` AAA Certificate Services: ${hasAAA ? 'ā FOUND' : 'ā MISSING'}`);
// 3. Test connections
console.log('\nāāā Connection Test (without setDefaultCACertificates) āāā');
const targets = [
'https://api.github.com',
'https://api.business.githubcopilot.com',
'https://api.individual.githubcopilot.com',
'https://api.enterprise.githubcopilot.com',
];
for (const url of targets) {
try {
const resp = await fetch(url);
console.log(` ${new URL(url).hostname}: ā OK (${resp.status})`);
} catch (e) {
console.log(` ${new URL(url).hostname}: ā ${e.cause?.code || e.message}`);
}
}
// 4. Test with setDefaultCACertificates (copilot behavior)
console.log('\nāāā Connection Test (with setDefaultCACertificates - mimics copilot) āāā');
if (typeof tls.setDefaultCACertificates === 'function') {
tls.setDefaultCACertificates(allCerts);
for (const url of targets) {
try {
const resp = await fetch(url);
console.log(` ${new URL(url).hostname}: ā OK (${resp.status})`);
} catch (e) {
console.log(` ${new URL(url).hostname}: ā ${e.cause?.code || e.message}`);
}
}
} else {
console.log(' setDefaultCACertificates not available');
}
console.log('\nāāā Summary āāā');
console.log('If connections fail ONLY after setDefaultCACertificates, the issue is');
console.log('likely a Node.js bug. Check: https://github.com/nodejs/node/issues');
console.log('');
console.log('If you have corporate/VPN certificates in "system", that may be why');
console.log('it works for you but not for others.');
Expand for what openssl s_client -connect api.individual.githubcopilot.com:443 shows on my machine
$ openssl s_client -connect api.individual.githubcopilot.com:443
Connecting to 140.82.113.22
CONNECTED(00000005)
depth=2 C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
verify return:1
depth=1 C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN=*.individual.githubcopilot.com
verify return:1
---
Certificate chain
0 s:CN=*.individual.githubcopilot.com
i:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
a:PKEY: RSA, 4096 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Apr 8 00:00:00 2025 GMT; NotAfter: Apr 8 23:59:59 2026 GMT
1 s:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
i:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
a:PKEY: RSA, 2048 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Nov 2 00:00:00 2018 GMT; NotAfter: Dec 31 23:59:59 2030 GMT
2 s:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
i:C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA Certificate Services
a:PKEY: RSA, 4096 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Mar 12 00:00:00 2019 GMT; NotAfter: Dec 31 23:59:59 2028 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHZDCCBkygAwIBAgIRAPhEj0GyA9x6QG+9Zm3PufgwDQYJKoZIhvcNAQELBQAw
gY8xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UE
AxMuU2VjdGlnbyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBD
QTAeFw0yNTA0MDgwMDAwMDBaFw0yNjA0MDgyMzU5NTlaMCkxJzAlBgNVBAMMHiou
aW5kaXZpZHVhbC5naXRodWJjb3BpbG90LmNvbTCCAiIwDQY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hAnERHBMaABmtCWIzt0V/SQTfHBXPehFG4b8cJssc7
jrwIwjDE5R63VA4a+cwejqG0cy/K/OvZ
-----END CERTIFICATE-----
subject=CN=*.individual.githubcopilot.com
issuer=C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 5678 bytes and written 1629 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Protocol: TLSv1.3
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: AB416972B12AFF7DC6B6E09FADA3DD691A0A81E6E76E37995E06170B210B7616
Session-ID-ctx:
Resumption PSK: 7D4E8123109E2F6F7D5F5E76258C4B27CBC794FA0968270BECC95C39FA3D32BF
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 9a 8f db 7d 71 8e 06 96-ac 77 a1 df 56 a3 61 59 ...}q....w..V.aY
0010 - e1 2b 67 06 8a 30 28 ad-b7 33 2c 42 8b 5d 09 4d .+g..0(..3,B.].M
Start Time: 1767708638
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: 6951D09F64DDE36F15109545E55FAD071B9F82E012FA2010FA66D6D16CD3E080
Session-ID-ctx:
Resumption PSK: 043702FE0647FFBF243FDCA7C6E540FBA0C8B657D951ABBFE585000B6089F045
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 77 8c 51 9c 37 5b 84 57-c3 b3 fc 62 69 4d 24 e0 w.Q.7[.W...biM$.
0010 - bf 92 91 2d 6a 08 0c ab-e9 d2 a7 0c 39 55 01 30 ...-j.......9U.0
Start Time: 1767708638
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
closed
@andyfeller, here are the results. I will be able to run the diagnostics script later.
openssl s_client -connect api.individual.githubcopilot.com:443
CONNECTED(00000005)
depth=3 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify return:1
depth=2 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication Root R46
verify return:1
depth=1 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV R36
verify return:1
depth=0 CN = *.actions.githubusercontent.com
verify return:1
write W BLOCK
---
Certificate chain
0 s:/CN=*.actions.githubusercontent.com
i:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication CA DV R36
1 s:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication CA DV R36
i:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication Root R46
2 s:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication Root R46
i:/C=US/ST=New Jersey/L=Jersey City/O=The USERTRUST Network/CN=USERTrust RSA Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHuDCCBiCgAwIBAgIQQpoM0ALJqV2GN3xNM4T2OjANBgkqhkiG9w0BAQwFADBg
MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD
Ey5TZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gQ0EgRFYgUjM2
MB4XDTI1MDYxMDAwMDAwMFoXDTI2MDYxMDIzNTk1OVowKjEoMCYGA1UEAwwfKi5h
Y3Rpb25zLmdpdG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uF/ALfhH+n60VjaBfoeS9M/fQmEekxsZ5RFpmEMkDm3Y36tdDFKtFC9Cb4o9wal
FkZnwghK+JatRsjAj+5HmW7iKZoptAIK0Z3vKS/ptCql4wnDMDH7bkDsb9KeDEnN
6eG0PTNhnp+byRcFf+/KfVdNxsNw+sZqTly8bbg8Z2jnUd6o7XPEyIqVRm9KUjQk
f+Tb1cuwyT11MyCSxfFwHnCtgSh1wIPJRvbcFlL4K9HJYvG1UuXHLsRQB6/KG0oK
WgluOHrqp6q8psLk
-----END CERTIFICATE-----
subject=/CN=*.actions.githubusercontent.com
issuer=/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication CA DV R36
---
No client certificate CA names sent
Server Temp Key: ECDH, X25519, 253 bits
---
SSL handshake has read 6091 bytes and written 351 bytes
---
New, TLSv1/SSLv3, Cipher is AEAD-CHACHA20-POLY1305-SHA256
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.3
Cipher : AEAD-CHACHA20-POLY1305-SHA256
Session-ID:
Session-ID-ctx:
Master-Key:
Start Time: 1767710757
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---
read R BLOCK
read R BLOCK
closed
security find-certificate -a -c "AAA Certificate Services" /System/Library/Keychains/SystemRootCertificates.keychain
keychain: "/System/Library/Keychains/SystemRootCertificates.keychain"
version: 256
class: 0x80001000
attributes:
"alis"<blob>="AAA Certificate Services"
"cenc"<uint32>=0x00000003
"ctyp"<uint32>=0x00000001
"hpky"<blob>=0xA0110A233E96F107ECE2AF29EF82A57FD030A4B4 "\240\021\012#>\226\361\007\354\342\257)\357\202\245\177\3200\244\264"
"issu"<blob>=0x307B310B3009060355040613024742311B301906035504080C1247726561746572204D616E636865737465723110300E06035504070C0753616C666F7264311A3018060355040A0C11436F6D6F646F204341204C696D697465643121301F06035504030C18414141204365727469666963617465205365727669636573 "0{1\0130\011\006\003U\004\006\023\002GB1\0330\031\006\003U\004\010\014\022Greater Manchester1\0200\016\006\003U\004\007\014\007Salford1\0320\030\006\003U\004\012\014\021Comodo CA Limited1!0\037\006\003U\004\003\014\030AAA Certificate Services"
"labl"<blob>="AAA Certificate Services"
"skid"<blob>=0xA0110A233E96F107ECE2AF29EF82A57FD030A4B4 "\240\021\012#>\226\361\007\354\342\257)\357\202\245\177\3200\244\264"
"snbr"<blob>=0x01
"subj"<blob>=0x307B310B3009060355040613024742311B301906035504080C1247726561746572204D616E636865737465723110300E06035504070C0753616C666F7264311A3018060355040A0C11436F6D6F646F204341204C696D697465643121301F06035504030C18414141204365727469666963617465205365727669636573 "0{1\0130\011\006\003U\004\006\023\002GB1\0330\031\006\003U\004\010\014\022Greater Manchester1\0200\016\006\003U\004\007\014\007Salford1\0320\030\006\003U\004\012\014\021Comodo CA Limited1!0\037\006\003U\004\003\014\030AAA Certificate Services"
security find-certificate -a -c "USERTrust RSA Certification Authority" /System/Library/Keychains/SystemRootCertificates.keychain
keychain: "/System/Library/Keychains/SystemRootCertificates.keychain"
version: 256
class: 0x80001000
attributes:
"alis"<blob>="USERTrust RSA Certification Authority"
"cenc"<uint32>=0x00000003
"ctyp"<uint32>=0x00000001
"hpky"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"issu"<blob>=0x308188310B3009060355040613025553311330110603550408130A4E4557204A4552534559311430120603550407130B4A45525345592043495459311E301C060355040A131554484520555345525452555354204E4554574F524B312E302C06035504031325555345525452555354205253412043455254494649434154494F4E20415554484F52495459 "0\201\2101\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\010\023\012NEW JERSEY1\0240\022\006\003U\004\007\023\013JERSEY CITY1\0360\034\006\003U\004\012\023\025THE USERTRUST NETWORK1.0,\006\003U\004\003\023%USERTRUST RSA CERTIFICATION AUTHORITY"
"labl"<blob>="USERTrust RSA Certification Authority"
"skid"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"snbr"<blob>=0x01FD6D30FCA3CA51A81BBC640E35032D "\001\375m0\374\243\312Q\250\033\274d\0165\003-"
"subj"<blob>=0x308188310B3009060355040613025553311330110603550408130A4E4557204A4552534559311430120603550407130B4A45525345592043495459311E301C060355040A131554484520555345525452555354204E4554574F524B312E302C06035504031325555345525452555354205253412043455254494649434154494F4E20415554484F52495459 "0\201\2101\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\010\023\012NEW JERSEY1\0240\022\006\003U\004\007\023\013JERSEY CITY1\0360\034\006\003U\004\012\023\025THE USERTRUST NETWORK1.0,\006\003U\004\003\023%USERTRUST RSA CERTIFICATION AUTHORITY"
It's weird! When I set the proxy to a MitmProxy (I want to intercept and debug the request), it works!
Thanks for the additional details, @a1mersnow š¤ Are you using
copiloton a corporate network or VPN that has proxying requirements or perhaps is blocking Copilot Individual subscriptions?At the least, this highlights an opportunity to improve the error messaging and logging when unable to make HTTP connections for GitHub MCP server and talking to Copilot API.
In the mean time,
NODE_DEBUG=http,https,undici copilotshould provide lower-level HTTP logs. I'd be interested if any connections are being refused or if there is something else going on.Expand for snippet from my
copilotlogs for comparison
@a1mersnow : I want to make sure we don't lose track of your report separate from the SSL/TLS certificate issue we're discussing with Paolo and Vitalii
@lvitaly : Can you tell me more about the environment you are running in?
CONNECTED(00000005) depth=3 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority verify return:1 depth=2 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication Root R46 verify return:1 depth=1 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV R36 verify return:1 depth=0 CN = *.actions.githubusercontent.com verify return:1 write W BLOCK --- Certificate chain 0 s:/CN=*.actions.githubusercontent.com i:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication CA DV R36 1 s:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication CA DV R36 i:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication Root R46 2 s:/C=GB/O=Sectigo Limited/CN=Sectigo Public Server Authentication Root R46 i:/C=US/ST=New Jersey/L=Jersey City/O=The USERTRUST Network/CN=USERTrust RSA Certification Authority
I have never seen an attempt to resolve a Copilot subscription route like this resolve to *.actions.githubusercontent.com, which I suspect is part of the problem here.
Thinking you might be trying to do this within a GitHub Actions workflow, I threw together the following workflow and verified that all of GitHub APIs resolve to the appropriate subjects:
name: Copilot CLI Debug
on:
workflow_dispatch:
jobs:
network:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Verify SSL/TLS certificate
run: |
openssl s_client -connect api.github.com:443
openssl s_client -connect api.individual.githubcopilot.com:443
openssl s_client -connect api.business.githubcopilot.com:443
openssl s_client -connect api.enterprise.githubcopilot.com:443
Resulting in the following on all 3 OS:
Run openssl s_client -connect api.github.com:443
depth=2 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication Root E46
verify return:1
depth=1 C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV E36
verify return:1
CONNECTED(00000005)
depth=0 CN = *.github.com
---
verify return:1
Certificate chain
DONE
0 s:CN = *.github.com
i:C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV E36
1 s:C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV E36
i:C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication Root E46
2 s:C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication Root E46
i:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust ECC Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
subject=CN = *.github.com
issuer=C = GB, O = Sectigo Limited, CN = Sectigo Public Server Authentication CA DV E36
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3088 bytes and written 380 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify return:1
CONNECTED(00000005)
---
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
Certificate chain
0 s:CN = *.individual.githubcopilot.com
i:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
1 s:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
i:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
2 s:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
i:C = GB, ST = Greater Manchester, L = Salford, O = Comodo CA Limited, CN = AAA Certificate Services
---
Server certificate
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
subject=CN = *.individual.githubcopilot.com
issuer=C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 5678 bytes and written 398 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
verify return:1
depth=0 CN = *.individual.githubcopilot.com
verify return:1
DONE
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
CONNECTED(00000006)
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN = *.business.githubcopilot.com
verify return:1
DONE
---
Certificate chain
0 s:CN = *.business.githubcopilot.com
i:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
1 s:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
i:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
2 s:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
i:C = GB, ST = Greater Manchester, L = Salford, O = Comodo CA Limited, CN = AAA Certificate Services
---
Server certificate
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
subject=CN = *.business.githubcopilot.com
issuer=C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 5674 bytes and written 396 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
CONNECTED(00000006)
verify return:1
---
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
Certificate chain
verify return:1
depth=0 CN = *.enterprise.githubcopilot.com
verify return:1
DONE
0 s:CN = *.enterprise.githubcopilot.com
i:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
1 s:C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
i:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
2 s:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
i:C = GB, ST = Greater Manchester, L = Salford, O = Comodo CA Limited, CN = AAA Certificate Services
---
Server certificate
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
subject=CN = *.enterprise.githubcopilot.com
issuer=C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 5678 bytes and written 398 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
@andyfeller, I've run your diagnosis script š¤·āāļø runs on MBP with M1 Pro chip and macOS 26.2.
git/oss/copilot-cli via ī v24.11.1
Ī» node diagnosis.mjs
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā CA Certificate Diagnostic for GitHub Copilot CLI Issue #869 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Node.js version: v24.11.1
Platform: darwin arm64
āāā Certificate Sources āāā
default (getCACertificates()): 146 certificates
system: 11 certificates
bundled: 146 certificates
extra: 0 certificates
āāā Required Root CA Check āāā
USERTrust RSA Certification Authority: ā FOUND
AAA Certificate Services: ā MISSING
āāā Connection Test (without setDefaultCACertificates) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Connection Test (with setDefaultCACertificates - mimics copilot) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Summary āāā
If connections fail ONLY after setDefaultCACertificates, the issue is
likely a Node.js bug. Check: https://github.com/nodejs/node/issues
If you have corporate/VPN certificates in "system", that may be why
it works for you but not for others.
git/oss/copilot-cli via ī v25.2.1
Ī» node diagnosis.mjs
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā CA Certificate Diagnostic for GitHub Copilot CLI Issue #869 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Node.js version: v25.2.1
Platform: darwin arm64
āāā Certificate Sources āāā
default (getCACertificates()): 146 certificates
system: 11 certificates
bundled: 146 certificates
extra: 0 certificates
āāā Required Root CA Check āāā
USERTrust RSA Certification Authority: ā FOUND
AAA Certificate Services: ā MISSING
āāā Connection Test (without setDefaultCACertificates) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Connection Test (with setDefaultCACertificates - mimics copilot) āāā
api.github.com: ā OK (200)
api.business.githubcopilot.com: ā OK (404)
api.individual.githubcopilot.com: ā OK (404)
api.enterprise.githubcopilot.com: ā OK (404)
āāā Summary āāā
If connections fail ONLY after setDefaultCACertificates, the issue is
likely a Node.js bug. Check: https://github.com/nodejs/node/issues
If you have corporate/VPN certificates in "system", that may be why
it works for you but not for others.
And actually, the workaround @paolomainardi suggested works for me.
mkdir -p ~/.ssl
security find-certificate -a -p /Library/Keychains/System.keychain > ~/.ssl/ca-bundle.pem
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> ~/.ssl/ca-bundle.pem
NODE_EXTRA_CA_CERTS="$HOME/.ssl/ca-bundle.pem" copilot
After an extensive and long debugging session with the help of Copilot, I guess i found the root cause of this issue. Thanks @andyfeller for pointing me out the commands.
TLDR
Removing those 2 certificates in my login keychain, fixed this issue.
⯠openssl s_client -connect api.individual.githubcopilot.com:443
Connecting to 140.82.112.22
CONNECTED(00000006)
depth=2 C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
verify return:1
depth=1 C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN=*.individual.githubcopilot.com
verify return:1
---
Certificate chain
0 s:CN=*.individual.githubcopilot.com
i:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
a:PKEY: RSA, 4096 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Apr 8 00:00:00 2025 GMT; NotAfter: Apr 8 23:59:59 2026 GMT
1 s:C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
i:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
a:PKEY: RSA, 2048 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Nov 2 00:00:00 2018 GMT; NotAfter: Dec 31 23:59:59 2030 GMT
2 s:C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
i:C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA Certificate Services
a:PKEY: RSA, 4096 (bit); sigalg: sha384WithRSAEncryption
v:NotBefore: Mar 12 00:00:00 2019 GMT; NotAfter: Dec 31 23:59:59 2028 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHZDCCBkygAwIBAgIRAPhEj0GyA9x6QG+9Zm3PufgwDQYJKoZIhvc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dGh1YmNvcGlsb3QuY29tMA0GCSqGSIb3DQEB
CwUAA4IBAQB5o6/7HSqflCyD88x8h9FcCYAYiic8gm4pTX4ucv6zP4LP9CHtxWCN
s7b1SwZEh83Xb3huOXPCZpwWt6JEmkQdEegcNpFET0jTTJf/FbCIRY3uIw/mSRxk
mZfqN1N3VJPcGPGiqmmZz2t33DAIQeYsDOzUVIZw2cHM1pjLVgIyUuGJCGURPyf/
86CqjNt3D3abuJ6OV9ywcqS4SXObcWosXFKa6B2dQ8RSmWdWc/4GgIj+q4ZPOBu1
Es00WQqMmUKyemdyTE9XBmhAnERHBMaABmtCWIzt0V/SQTfHBXPehFG4b8cJssc7
jrwIwjDE5R63VA4a+cwejqG0cy/K/OvZ
-----END CERTIFICATE-----
subject=CN=*.individual.githubcopilot.com
issuer=C=GB, ST=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 5678 bytes and written 1627 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_128_GCM_SHA256
Protocol: TLSv1.3
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: 30EEB6C8EA664BDD19A882D2D01421B4BDDE71D41817BBDA148168CEC6A04E29
Session-ID-ctx:
Resumption PSK: 6B191970A6326F0847B9B835625E6C20A0AC5A96740E92DBC860C923C8659D4E
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 8e 64 05 b1 38 f4 07 0c-be 6f 14 fe 79 f3 03 88 .d..8....o..y...
0010 - ae 13 37 9d 99 3a 6a 9c-e2 c5 aa 7e 15 6b 94 2c ..7..:j....~.k.,
Start Time: 1767723205
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_128_GCM_SHA256
Session-ID: F40C257196105496A98B0049FD8624E87944393FEC97E69AD95E777E749DA30A
Session-ID-ctx:
Resumption PSK: 869D2F89794CB224EDAB0785C117C7E8EE71F99DE09C8A8824DF1176814DE385
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 0b 6a 0c 64 c1 8b b4 06-b9 97 22 23 d9 49 9b 4b .j.d......"#.I.K
0010 - 55 01 5c 81 5e 3a 9e 95-03 d9 58 2e de a3 71 31 U.\.^:....X...q1
Start Time: 1767723205
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
closed
⯠security find-certificate -a -c "USERTrust RSA Certification Authority" ~/Library/Keychains/login.keychain-db
keychain: "/Users/paolomainardi/Library/Keychains/login.keychain-db"
version: 512
class: 0x80001000
attributes:
"alis"<blob>="USERTrust RSA Certification Authority"
"cenc"<uint32>=0x00000003
"ctyp"<uint32>=0x00000001
"hpky"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"issu"<blob>=0x308188310B3009060355040613025553311330110603550408130A4E4557204A4552534559311430120603550407130B4A45525345592043495459311E301C060355040A131554484520555345525452555354204E4554574F524B312E302C06035504031325555345525452555354205253412043455254494649434154494F4E20415554484F52495459 "0\201\2101\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\010\023\012NEW JERSEY1\0240\022\006\003U\004\007\023\013JERSEY CITY1\0360\034\006\003U\004\012\023\025THE USERTRUST NETWORK1.0,\006\003U\004\003\023%USERTRUST RSA CERTIFICATION AUTHORITY"
"labl"<blob>="USERTrust RSA Certification Authority"
"skid"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"snbr"<blob>=0x01FD6D30FCA3CA51A81BBC640E35032D "\001\375m0\374\243\312Q\250\033\274d\0165\003-"
"subj"<blob>=0x308188310B3009060355040613025553311330110603550408130A4E4557204A4552534559311430120603550407130B4A45525345592043495459311E301C060355040A131554484520555345525452555354204E4554574F524B312E302C06035504031325555345525452555354205253412043455254494649434154494F4E20415554484F52495459 "0\201\2101\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\010\023\012NEW JERSEY1\0240\022\006\003U\004\007\023\013JERSEY CITY1\0360\034\006\003U\004\012\023\025THE USERTRUST NETWORK1.0,\006\003U\004\003\023%USERTRUST RSA CERTIFICATION AUTHORITY"
keychain: "/Users/paolomainardi/Library/Keychains/login.keychain-db"
version: 512
class: 0x80001000
attributes:
"alis"<blob>="USERTrust RSA Certification Authority"
"cenc"<uint32>=0x00000003
"ctyp"<uint32>=0x00000001
"hpky"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"issu"<blob>=0x307B310B3009060355040613024742311B301906035504080C1247726561746572204D616E636865737465723110300E06035504070C0753616C666F7264311A3018060355040A0C11436F6D6F646F204341204C696D697465643121301F06035504030C18414141204365727469666963617465205365727669636573 "0{1\0130\011\006\003U\004\006\023\002GB1\0330\031\006\003U\004\010\014\022Greater Manchester1\0200\016\006\003U\004\007\014\007Salford1\0320\030\006\003U\004\012\014\021Comodo CA Limited1!0\037\006\003U\004\003\014\030AAA Certificate Services"
"labl"<blob>="USERTrust RSA Certification Authority"
"skid"<blob>=0x5379BF5AAA2B4ACF5480E1D89BC09DF2B20366CB "Sy\277Z\252+J\317T\200\341\330\233\300\235\362\262\003f\313"
"snbr"<blob>=0x3972443AF922B751D7D36C10DD313595 "9rD:\371"\267Q\327\323l\020\33515\225"
"subj"<blob>=0x308188310B3009060355040613025553311330110603550408130A4E4557204A4552534559311430120603550407130B4A45525345592043495459311E301C060355040A131554484520555345525452555354204E4554574F524B312E302C06035504031325555345525452555354205253412043455254494649434154494F4E20415554484F52495459 "0\201\2101\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\010\023\012NEW JERSEY1\0240\022\006\003U\004\007\023\013JERSEY CITY1\0360\034\006\003U\004\012\023\025THE USERTRUST NETWORK1.0,\006\003U\004\003\023%USERTRUST RSA CERTIFICATION AUTHORITY"
tls.getCACertificates('system') on macOS returns certificates from the user's login keychain, not Apple's trusted root certificates. These user-installed certificates can interfere with OpenSSL's certificate path building when combined with bundled certificates.
How to reproduce the bug
This procedure just add the two certificates in the MacOS login keychain, which raise the bug, at least on my system.
# This procedure is completely harmless and reversible.
# It downloads official Sectigo/USERTrust CA certificates (public, widely used)
# and adds them to your login keychain. These are legitimate root CA certificates.
# Download the official USERTrust RSA root certificate (self-signed, expires 2038)
# This is the same certificate already in Apple's System Roots
curl -o usertrust-selfsigned.crt "https://crt.sh/?d=1199354"
# Download the cross-signed version (same cert, but signed by AAA Certificate Services)
# This is used for backward compatibility with older systems
curl -o usertrust-crosssigned.crt "https://crt.sh/?d=1282303295"
# Add both certificates to your login keychain
# This simulates what happens when you connect to eduroam WiFi or enterprise networks
security add-certificates -k ~/Library/Keychains/login.keychain-db usertrust-selfsigned.crt
security add-certificates -k ~/Library/Keychains/login.keychain-db usertrust-crosssigned.crt
# Test - this should fail with "unable to get issuer certificate"
NODE_DEBUG=undici npx @github/[email protected] -p "hello"
## Cleanup: Delete certificates from the GUI.
Then remove the certificates from the GUI:
Certificates chain
This is my actual installed certificates:
# Apple's trusted root certificates
$ security find-certificate -a /System/Library/Keychains/SystemRootCertificates.keychain | grep -c "keychain:"
156
# What Node.js getCACertificates('system') actually returns
$ node -e "console.log(require('tls').getCACertificates('system').length)"
9
The 9 certificates returned are user-installed certificates with explicit trust settings (from login keychain), not Apple's 156 system roots. This was before I have deleted the 2 USERTrust RSA Certification Authority present on my login keychain.
Why this breaks Copilot CLI
Copilot CLI v0.0.370+ uses:
tls.setDefaultCACertificates([...bundled, ...system]);
The bundled certificates (Mozilla CA bundle) already contain all necessary root CAs including USERTrust RSA and AAA Certificate Services.
The problem is that system can return certificates from the user's login keychain that conflict with bundled certificates. In my case, I had old eduroam WiFi certificates in my login keychain:
| Certificate | Expires | Keychain | Issuer |
|---|---|---|---|
| USERTrust RSA | 2038 | login | USERTrust RSA (self-signed) |
| USERTrust RSA | 2029 | login | AAA Certificate Services (cross-signed) |
| USERTrust RSA | 2038 | System Roots | USERTrust RSA (self-signed) |
When these duplicate certificates with the same Subject but different Issuers are combined with bundled, OpenSSL's path building gets confused and fails with UNABLE_TO_GET_ISSUER_CERT.
After removing the two USERTrust certificates from my login keychain (via Keychain Access app), Copilot CLI started working immediately. This confirms the issue is caused by user-installed certificates interfering with the bundled CA store.
Fixes
Don't merge system certificates with bundled. Either:
- Use only
bundledcertificates, or - Deduplicate by Subject before merging, preferring self-signed roots
Maybe just using bundled is the right choice, as the users with more advanced needs can use standard node envs.
First, I just want to say I appreciate the way you communicate and show what is going on, @paolomainardi; you've truly made this issue a pleasure to pair on! āØ
Fixes
Don't merge
systemcertificates withbundled. Either:
- Use only
bundledcertificates, or- Deduplicate by Subject before merging, preferring self-signed roots
Maybe just using bundled is the right choice, as the users with more advanced needs can use standard node envs.
Right now, I'm investigating the motivation behind merging the system certificates before weighing in on a potential fix. š¤ I appreciate your patience while I figure that out š
@andyfeller I don't wanna hijack this conversation. But as you're having discussions with the team, I just wanted to bring this issue to your attention. I haven't confirmed anything yet, but I have a suspicion this issue also applies to VS Code as well.
It'd be amazing to get a fix across everything.
Thanks so much!
https://github.com/microsoft/vscode/issues/282332