Unable to pass environment variables to GitHub Copilot Coding Agent #167401
Replies: 3 comments 1 reply
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I've had the same issue. After extensive debugging, I've found that you have to set the env vars in multiple places. For the env vars to be available when the agent is setting up (ie. running the steps defined in Additionally, you need to specify env vars against the |
Beta Was this translation helpful? Give feedback.
-
|
a simple way it works for me: COPILOT_AGENT_<Key_label> for e.g if I want to add secret like azure openai key I use COPILOT_AGENT_AZURE_OPENAI_API_KEY and copilot coding agent able to get and use that secret. the secret should be set in copilot environment. This is sure to work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Copilot Feature Area
Copilot Coding Agent
Body
Problem Description
I'm implementing a new workflow to assign GitHub issues to the GitHub Copilot Coding Agent. The agent needs access to environment variables for running unit tests that depend on external services like Redis.
Current Setup
Following the official documentation: Customizing the development environment for Copilot Coding Agent
Using GitHub Actions services feature to set up Redis with username and password
Unit tests require Redis connection parameters to run successfully
Issue
Environment variables are not being passed to the Copilot Coding Agent, preventing it from running unit tests that require service credentials.
Attempted Solutions
Dynamic Environment Variables: Tried pushing Redis credentials as environment parameters to the agent during workflow execution - no values were passed through
Static Configuration: Attempted to configure Redis credentials as static values through the UI as described in the documentation - this approach also failed
Expected Behavior
The Copilot Coding Agent should have access to the configured environment variables (Redis username, password, host, etc.) to successfully run unit tests in the prepared testing environment.
Questions
How should environment variables be properly configured for the Copilot Coding Agent?
Are there specific requirements or limitations for passing service credentials?
Is there a recommended approach for handling external service dependencies in the agent environment?
Environment Details
Using GitHub Actions services for Redis setup
Following official documentation for agent environment customization
Need to pass database connection parameters for unit test execution
Beta Was this translation helpful? Give feedback.
All reactions