Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote ssh environment and path control #5409

Closed
yassinm opened this issue Aug 3, 2021 · 4 comments
Closed

Remote ssh environment and path control #5409

yassinm opened this issue Aug 3, 2021 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@yassinm
Copy link

yassinm commented Aug 3, 2021

I am trying to use vscode in remote ssh mode for golang development. This is not specific to golang per say but affects all remote ssh development when one wants more control on what binaries are put in the path. From what i can tell there is no way i can set environment variables on the remote instance in a controlled way right now.

I think now it assumes remote ssh is based on your bashrc/bash_profile to set your environment. But since i am using the remove development for multiple projects i am not able to set my environment variables correctly. This for example affects what compilers/debuggers and runtimes you can have in your path.

This feature request is to make a way i can force vscode to use specific environment settings ? Something like the .vscode launch configuration but for remote ssh where you can specify what environment variables to use. is this something in the works already since i could not find something similar so far ?

@weinand weinand removed their assignment Aug 3, 2021
@weinand weinand assigned roblourens and unassigned weinand Aug 3, 2021
@roblourens roblourens transferred this issue from microsoft/vscode Aug 3, 2021
@roblourens
Copy link
Member

Do you want the environment variables in terminals? Or in the remote EH? What is your workflow in local windows?

@roblourens roblourens added the info-needed Issue requires more information from poster label Aug 3, 2021
@yassinm
Copy link
Author

yassinm commented Aug 4, 2021

@roblourens in the remote EH for now. There is no way i can set what environment vscode will see. From the terminal i can figure what to do.

My local wokflow is i have a set of bash aliases that i run to set my environment correctly inside the terminal. I don't necessarily want to expose that to vscode. If i can tell the remote vscode instance to use something like the below via a .vscode/settings configuration i should be fine.

      "env": {
        "PATH": "<mypath>",
      },

@yassinm
Copy link
Author

yassinm commented Aug 27, 2021

@roblourens just wanted to make sure if this still needs the needs-more-info-tag ?

@roblourens
Copy link
Member

We don't support something like that. The closest you can get right now is using SendEnv in your ssh config, or changing your bashrc (neither of these are really sufficient though).

Covered in some issues like
#141
#1139

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 31, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants