GitHub Copilot CLI fails to pass AZURE_OPENAI_API_KEY environment variable to sub-process #195161
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.
-
Beta Was this translation helpful? Give feedback.
-
|
This sounds like the subprocess is being launched from a sanitized environment, or from a different shell context than the one where you exported AZURE_OPENAI_API_KEY. A few checks help narrow it down:
For security, I would avoid hardcoding the key in the skill itself. If possible, use a short-lived token, secret manager, or managed identity based authentication instead of a long-lived AZURE_OPENAI_API_KEY. |
Beta Was this translation helpful? Give feedback.






Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Copilot in GitHub
Body
I have a SKILL that executes a script requiring the
AZURE_OPENAI_API_KEYenvironment variable. However, I have discovered that the GitHub Copilot CLI fails to pass this variable to the sub-process. I have already tried using the--yoloflag and exporting the variable locally, but it is still not being detected. Does anyone know how to resolve this issue and successfully pass theAZURE_OPENAI_API_KEYto the sub-process?Beta Was this translation helpful? Give feedback.
All reactions