Skip to content

Agents Window: Git HTTPS authentication fails in Dev Containers (missing REMOTE_CONTAINERS_IPC) #11939

Open

Description

@miquelcv
  • 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

  1. Open a Dev Container with a private Azure DevOps HTTPS Git repository and working credential forwarding.

  2. 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
  3. Check REMOTE_CONTAINERS_IPC in each environment.

Actual Results / Logs

  • Integrated terminal: Git succeeds (exit code 0).

  • Copilot Agent — Editor Window: REMOTE_CONTAINERS_IPC matches the Dev Containers credential helper socket; Git succeeds (exit code 0).

  • Copilot Agent — Agents Window: REMOTE_CONTAINERS_IPC is 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 HEAD

Result: 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

Could you investigate why REMOTE_CONTAINERS_IPC is still missing in Agents Window after #340566? Is #340467 expected to address this scenario?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions