Repository navigation
Description
- VSCode Version: 1.145.0
- Local OS Version: macOS (Apple Silicon)
- Remote OS Version: Ubuntu Linux, user
vscode - Remote Extension/Connection Type: Dev Containers
- Git remote: Private Azure DevOps HTTPS repository
- Copilot: Agent Host, sandbox disabled
Description
Git HTTPS authentication fails when executed by Copilot Agent in Agents Window inside a Dev Container, while the same operation succeeds in both the integrated terminal and Copilot Agent in Editor Window.
The key difference is that REMOTE_CONTAINERS_IPC is unset in Agents Window, preventing the existing Dev Containers Git credential helper from accessing forwarded credentials.
This remains reproducible in VS Code 1.145.0 despite the environment-forwarding fix in microsoft/vscode#340566.
Steps to Reproduce
-
Open a Dev Container with a private Azure DevOps HTTPS Git repository and working credential forwarding.
-
Run the following command from the integrated terminal and from Copilot Agent in both Editor Window and Agents Window:
GIT_TERMINAL_PROMPT=0 git -C /work/platform-iac ls-remote origin HEAD
-
Check
REMOTE_CONTAINERS_IPCin each environment.
Actual Results / Logs
-
Integrated terminal: Git succeeds (exit code 0).
-
Copilot Agent — Editor Window:
REMOTE_CONTAINERS_IPCmatches the Dev Containers credential helper socket; Git succeeds (exit code 0). -
Copilot Agent — Agents Window:
REMOTE_CONTAINERS_IPCis unset; Git fails (exit code 128):fatal: unable to get password from user
These results were verified after completely restarting the Docker Dev Container, reloading VS Code, and starting fresh agent sessions, without applying any workaround.
Verified Workaround
Explicitly setting REMOTE_CONTAINERS_IPC to the existing credential helper socket for a single Git command restores authentication in Agents Window:
helper=$(git config --system --get credential.helper)
uuid=$(printf '%s\n' "$helper" |
sed -n 's|.*vscode-remote-containers-\([0-9a-f-]*\)\.js.*|\1|p')
REMOTE_CONTAINERS_IPC="/tmp/vscode-remote-containers-ipc-${uuid}.sock" \
GIT_TERMINAL_PROMPT=0 \
git -C /work/platform-iac ls-remote origin HEADResult: Git succeeds (exit code 0), without modifying any persistent configuration.
Expected Behavior
Copilot Agent in Agents Window should inherit the Dev Container's Git credential forwarding environment, or provide equivalent credential forwarding, just as Editor Window does.
Additional Information
- Does this issue occur when you try this locally? Not applicable — the issue concerns Dev Container credential forwarding.
- Does this issue occur when you try this locally and all extensions are disabled? Not tested.
- VS Code Insiders: Not tested.
Related Issues / PRs
- Copilot harness in Dev Containers fails Git HTTPS authentication (missing REMOTE_CONTAINERS_IPC) #11899 — Original issue, closed as duplicate.
- agentHost: preserve Codespaces tokens in remote sessions vscode#340566 — Merged environment-forwarding fix, intended to cover both Editor Window and Agents Window.
- sessions: Add Git credential forwarding for Dev Containers vscode#340467 — Draft PR adding Git credential forwarding for Dev Containers.
Could you investigate why REMOTE_CONTAINERS_IPC is still missing in Agents Window after #340566? Is #340467 expected to address this scenario?
Activity