github / github/CopilotForXcode

GitHub Copilot for Xcode Fails in Enterprise Environments with MITM Proxy

オープン
#95 コメント 3 件 リアクション 6 件 担当者 0 名 GitHub で見る
主要言語
Swift
スター
6.3k
フォーク
2k
平均マージ
2分
マージ済み PR(30日)
2

説明

**Describe the bug**
In our enterprise environment, HTTPS traffic is intercepted and inspected using a MITM proxy, requiring the installation of a custom root certificate on all machines. While Node.js allows configuring the trust for a custom root certificate using environment variables such as `NODE_EXTRA_CA_CERTS=/path/to/certificate.pem`, GitHub Copilot for Xcode lacks an equivalent option. This results in the error: `unable to get local issuer certificate`.

**Versions**
- Copilot for Xcode: 0.29.0
- Xcode: 16.2 (likely not relevant)
- macOS: 14.7.2 (likely not relevant)

**Steps to reproduce**
1. Set up GitHub Copilot for Xcode in an enterprise network using a MITM proxy.
2. Attempt to use GitHub Copilot for Xcode on a project.
3. Observe that GitHub Copilot for Xcode fails to make suggestions due to certificate validation issues.

**Screenshots**
N/A

**Logs**
```plaintext
[2025-01-07T07:12:51.736Z] [info] [GitHubCopilot] [83702] window/logMessage: {
"message" : "[contentExclusion] Fetching content exclusion policies {\n params: {\n repos: 'git@path.to.github.enterprise:org\/repo.git',\n scope: 'repo'\n }\n}",
"type" : 4
}
[2025-01-07T07:12:51.788Z] [info] [GitHubCopilot] [83702] window/logMessage: {
"message" : "[contentExclusion] FetchError: unable to get local issuer certificate\n at fetch (\/snapshot\/copilot-client\/node_modules\/@adobe\/helix-fetch\/src\/fetch\/index.js:99:11)\n at processTicksAndRejections (node:internal\/process\/task_queues:95:5)\n at cachingFetch (\/snapshot\/copilot-client\/node_modules\/@adobe\/helix-fetch\/src\/fetch\/index.js:288:16)\n at zge.fetch (\/snapshot\/copilot-client\/lib\/src\/network\/helix.ts:93:22)\n at \/snapshot\/copilot-client\/lib\/src\/contentExclusion\/contentExclusions.ts:228:24 {\n type: 'system',\n _name: 'FetchError',\n code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',\n errno: undefined,\n erroredSysCall: undefined\n} Error evaluating policy for ",
"type" : 1
}
```

**Additional context**
In other environments, such as VSCode or IntelliJ IDEA, I can use GitHub Copilot by configuring the custom root certificate. This highlights that the issue is specific to GitHub Copilot for Xcode.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。