Skip to content

Preserve per-window environment variables between workspace changes #108571

@vkk-steigend

Description

@vkk-steigend
  • VSCode Version: 1.44.2
  • Local OS Version: Ubuntu 18.04.4 LTS
  • Remote OS Version: Debian Buster (10.3)
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Open a terminal in host machine
  2. Start an ssh-agent by eval $(ssh-agent -s)
  3. Add a key (key1) using ssh-add ~/.ssh/id_ed25519_key1
  4. Open VS Code from the same terminal code .
  5. Run ssh-add -l in VS Code terminal (shows the identity of key1) (:+1: )
  6. Open folder in Remote Container
  7. Run ssh-add -l in VS Code terminal (shows the identity of key1) (:+1: )
  8. Open another terminal in host machine
  9. Start a new ssh-agent by eval $(ssh-agent -s)
  10. Add a key (key2) using ssh-add ~/.ssh/id_ed25519_key2
  11. Open VS Code from the same terminal code .
  12. Run ssh-add -l in VS Code terminal (shows the identity of key2) (:+1: )
  13. Open folder in Remote Container
  14. Run ssh-add -l in VS Code terminal (shows the identity of key1) (:-1: )

VS Code somehow only forwards the first ssh-agent to remote container eventhough it has the correct ssh-agent forwarded locally. Am I missing any configuration? Can this be fixed with any settings in devcontainer.json?

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions