Fix: Azure DevOps PAT not exported as environment variable
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Completed​
Goal: Ensure AZURE_DEVOPS_EXT_PAT is automatically exported on container start so az devops commands work without manual setup.
GitHub Issue: #48
Last Updated: 2026-02-16
Completed: 2026-02-16
Problem​
The Azure DevOps PAT is stored at .devcontainer.secrets/env-vars/azure-devops-pat but is never exported as the AZURE_DEVOPS_EXT_PAT environment variable on container startup. This means az devops commands fail with authentication errors until the user manually exports it.
The verify_azure_devops() function in config-azure-devops.sh already handles loading the PAT from storage, exporting it as AZURE_DEVOPS_EXT_PAT, and writing it to ~/.bashrc for new shells. However, the entrypoint (image/entrypoint.sh) never calls config-azure-devops.sh --verify.
By contrast, git identity is correctly restored because the entrypoint calls config-git.sh --verify.
Solution​
Add a call to config-azure-devops.sh --verify in the entrypoint, following the same pattern as the existing config-git.sh --verify call.
Phase 1: Add Azure DevOps restore to entrypoint — ✅ DONE​
Tasks​
- 1.1 In
image/entrypoint.sh, add a call toconfig-azure-devops.sh --verifyafter the git identity section (after theconfig-git.sh --verifyblock around line 69) ✓ - 1.2 Follow the existing pattern: check if the script exists, run with
--verify, use|| trueto prevent failures from blocking startup ✓ - 1.3 Add a log line (e.g., "Restoring Azure DevOps configuration...") consistent with the git identity log style ✓
Validation​
Review the entrypoint change and verify:
- The new block follows the same pattern as the git identity block
- It won't fail if
config-azure-devops.shdoesn't exist (theif [ -f ... ]guard) - It won't block container startup on errors (
|| true)
User confirms phase is complete.
Acceptance Criteria​
-
config-azure-devops.sh --verifyis called fromentrypoint.shon container start - The call is guarded (script existence check +
|| true) - When
.devcontainer.secrets/env-vars/azure-devops-patexists,AZURE_DEVOPS_EXT_PATis available in shell sessions after container start - When no PAT file exists, startup proceeds without errors
- Pattern is consistent with existing
config-git.sh --verifycall
Files to Modify​
image/entrypoint.sh— addconfig-azure-devops.sh --verifycall