1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GitHub Copilot Coding AgentのFirewall設定

Last updated at Posted at 2025-05-26

エラー

I tried to connect to the following addresses, but was blocked by firewall rules:

概要

初期状態では、GitHub Copilot Coding Agentはインターネットに殆どアクセスできない。

FW(ファイアウォール)が設定されており、CopilotとGitHubのやりとりや、依存関係のダウンロードに必要な範囲だけ、アクセスが許可されている。

そこで、どこかの外部のサイトにアクセスが必要な場合は、FWにアクセス許可を追加するか、FWを無効にする必要がある。

設定方法

FWにアクセス許可を追加するには、COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS に、カンマ区切りでドメイン名やURLを記入すればOK。

なのだが、それをどこに書けば良いかが、とても分かり辛い。

Copilot coding agentは、GitHub Actionsで動いているようで、GitHubActionsの設定としても設定できるし、github.comのSettingsでも設定できるらしい。

github.com の Settings で設定

手っ取り早く、github.com の Settings で設定する場合は下記の手順で追加できる。

  1. github.com のリポジトリのページ
  2. 右上の「Settings」
  3. 左の「Environments」
  4. 「copilot」
  5. 「Environment variables」の「Add environment variable」
  6. Nameに「COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS」を、Valueに許可したいドメインやURLを「,」区切りで入力
  7. 「Add variable」

copilot-setup-steps.yml で設定

もし、Copilot coding agent の実行環境を .github/workflows/copilot-setup-steps.yml でカスタマイズしているなら、envの部分を下記のように書けばOK。

env:
  COPILOT_AGENT_FIREWALL_ALLOW_LIST_ADDITIONS: 許可したいドメインやURLを「,」区切りで記述

参考

詳しくは下記を参照。なお、FWを無効にすることもできるが、自由度高くて何をしでかすか分からず危険なのでお勧めしないらしい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?