Skip to content

Turning off inheritEnv as per prompt breaks vscode-remote #12176

Closed
@andyljones

Description

@andyljones

Environment data

  • VS Code version: 1.45.1
  • Extension version (available under the Extensions sidebar): 2020.5.80290
  • OS and version: macOS 10.15 local, Ubuntu 18.04 remote
  • Python version (& distribution if applicable, e.g. Anaconda): miniconda Python 3.7.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: vscode-remote
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): Language server
  • Value of the python.languageServer setting: Microsoft

Expected behaviour

The prompt to disable inheritEnv should warn that it'll break other things

Actual behaviour

When using a conda env, a prompt appears to disable inheritEnv so that conda activate will work in the terminal. Unfortunately, disabling inheritEnv breaks SSH agent forwarding in vscode-remote.

Steps to reproduce:

Set terminal.integrated.inheritEnv to False, then connect to a container with vscode remote and check the $SSH_AUTH_SOCK value in the terminal. It'll be empty, meaning SSH agent forwarding won't work.

For an exemplar container, I've followed this vscode tutorial:

git clone https://github.com/microsoft/vscode-express-sample.git
cd vscode-express-sample
docker-compose up
code .

Then from vscode, click through Remote Explorer -> right-click on container -> Attach to Container.

Within the window that opens inside the container, create a new terminal.

Run echo $SSH_AUTH_SOCK. It'll return an empty string.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions