microsoft / microsoft/vscode-remote-release

ssh-agent forwarding from WSL to devcontainer does not work after sleep

Open
#11,299 7 comments 1 reaction 1 assignee View on GitHub

@chrmarti is already working on this.

Since Nov 5, 2025.

containers info-needed
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version:
    Version: 1.105.1 (system setup)
    Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
    Date: 2025-10-14T22:33:36.618Z
    Electron: 37.6.0
    ElectronBuildId: 12502201
    Chromium: 138.0.7204.251
    Node.js: 22.19.0
    V8: 13.8.258.32-electron.0
    OS: Windows_NT x64 10.0.26200
  • Local OS Version: Windows 11 25H2 (Build 26200.6899)
  • WSL Version (Windows):
    WSL-Version: 2.6.1.0
    Kernelversion: 6.6.87.2-1
    WSLg-Version: 1.0.66
    MSRDC-Version: 1.2.6353
    Direct3D-Version: 1.611.1-81528511
    DXCore-Version: 10.0.26100.1-240331-1435.ge-release
    Windows-Version: 10.0.26200.6899
  • WSL Version (Linux): Linux MAINFRAME 6.6.87.2-microsoft-standard-WSL2 (Ubuntu)
  • Remote OS Version (decontainer): ubuntu:22.04
  • Remote Extension/Connection Type: Dev Containers (ms-vscode-remote.remote-containers 0.427.0)
  • Logs:

success (git fetch -v):

From :test
= [up to date] feature/inital-setup -> origin/feature/inital-setup
= [up to date] main -> origin/main

fail (git fetch -v):
git@: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Steps to Reproduce:

  1. Create a git repo in WSL
  2. Start ssh-agent in WSL (e.g. with keychain, ssh key with password)
  3. Try e.g. git fetch (in WSL) (should work)
  4. Reopen in devcontainer
  5. Try e.g. git fetch (in devcontainer) (should work)
  6. Wait until Sleep of Windows
  7. Login again
  8. Try e.g. git fetch (in devcontainer) (should NOT work)
  9. Try e.g. git fetch (in WSL) (should work)

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: N.A.

The ssh-agent forwarding from WSL to devcontainer does not work after sleep. But in WSL it is still working.

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.