Skip to content

Commit d04712c

Browse files
authored
Document setting environment variables for Copilot coding agent (#56356)
1 parent 903f209 commit d04712c

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

content/copilot/how-tos/agents/copilot-coding-agent/customizing-the-development-environment-for-copilot-coding-agent.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Customizing the development environment for Copilot coding agent
33
shortTitle: Customize the agent environment
4-
intro: 'Learn how to customize {% data variables.product.prodname_copilot %}''s development environment with additional tools.'
4+
intro: "Learn how to customize {% data variables.product.prodname_copilot %}'s development environment with additional tools."
55
versions:
66
feature: copilot
77
topics:
@@ -23,8 +23,9 @@ While working on a task, {% data variables.product.prodname_copilot_short %} has
2323

2424
You can customize {% data variables.product.prodname_copilot_short %}'s environment to:
2525

26-
* [Preinstall tools or dependencies in {% data variables.product.prodname_copilot_short %}'s environment](#preinstalling-tools-or-dependencies-in-copilots-environment).
27-
* [Upgrade from standard {% data variables.product.github %}-hosted {% data variables.product.prodname_actions %} runners to larger runners](#upgrading-to-larger-github-hosted-github-actions-runners).
26+
* [Preinstall tools or dependencies in {% data variables.product.prodname_copilot_short %}'s environment](#preinstalling-tools-or-dependencies-in-copilots-environment)
27+
* [Set environment variables in {% data variables.product.prodname_copilot_short %}'s environment](#setting-environment-variables-in-copilots-environment)
28+
* [Upgrade from standard {% data variables.product.github %}-hosted {% data variables.product.prodname_actions %} runners to larger runners](#upgrading-to-larger-github-hosted-github-actions-runners)
2829
* [Enable Git Large File Storage (LFS)](#enabling-git-large-file-storage-lfs)
2930
* [Disable or customize the agent's firewall](/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent).
3031

@@ -97,6 +98,19 @@ Your `copilot-setup-steps.yml` file will automatically be run as a normal {% dat
9798

9899
Once you have merged the yml file into your default branch, you can manually run the workflow from the repository's **Actions** tab at any time to check that everything works as expected. For more information, see [AUTOTITLE](/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow).
99100

101+
## Setting environment variables in {% data variables.product.prodname_copilot_short %}'s environment
102+
103+
You may want to set environment variables in {% data variables.product.prodname_copilot_short %}'s environment to configure or authenticate tools or dependencies that it has access to.
104+
105+
To set an environment variable for {% data variables.product.prodname_copilot_short %}, create a {% data variables.product.prodname_actions %} variable or secret in the `copilot` environment. If the value contains sensitive information, for example a password or API key, it's best to use a {% data variables.product.prodname_actions %} secret.
106+
107+
{% data reusables.repositories.navigate-to-repo %}
108+
{% data reusables.repositories.sidebar-settings %}
109+
{% data reusables.actions.sidebar-environment %}
110+
1. Click the `copilot` environment.
111+
1. To add a secret, under "Environment secrets," click **Add environment secret**. To add a variable, under "Environment variables," click **Add environment variable**.
112+
1. Fill in the "Name" and "Value" fields, and then click **Add secret** or **Add variable** as appropriate.
113+
100114
## Upgrading to larger {% data variables.product.prodname_dotcom %}-hosted {% data variables.product.prodname_actions %} runners
101115

102116
By default, {% data variables.product.prodname_copilot_short %} works in a standard {% data variables.product.prodname_actions %} runner with limited resources.

0 commit comments

Comments
 (0)