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

Environment variables missing when connecting through SSH #5976

Closed
chrmarti opened this issue Dec 1, 2021 · 3 comments
Closed

Environment variables missing when connecting through SSH #5976

chrmarti opened this issue Dec 1, 2021 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Dec 1, 2021

@chrmarti That was a very good idea. I do see a lot of differences between the printenv from the initialize command and from the SSH shell in VSCode before launching the container. Most notably, the HTTP_PROXY/HTTPS_PROXY variables are missing.

Now these variables get set in /etc/profile.d/<some_script>.sh which should normally get sourced automatically for every new shell, but don't seem to get sourced in this case. Is my understanding wrong and this is the correct behaviour, or should it in fact source these files first?

If I set these vars in the command explicitly, the login works:

"initializeCommand": "http_proxy='http://127.0.0.1:3128' https_proxy='http://127.0.0.1:3128' HTTPS_PROXY='http://127.0.0.1:3128/' HTTP_PROXY='http://127.0.0.1:3128/' ... az acr login -n <OurRegistryName>",

Originally posted by @cbandera in #2994 (comment)

@chrmarti chrmarti self-assigned this Dec 1, 2021
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers labels Dec 1, 2021
@chrmarti chrmarti added this to the November 2021 milestone Dec 1, 2021
@chrmarti chrmarti closed this as completed Dec 2, 2021
@cbandera
Copy link

cbandera commented Dec 2, 2021

@chrmarti Was this fixed? I can still reproduce the issue with the latest version

@cbandera
Copy link

cbandera commented Dec 3, 2021

This is fixed for me now with the latest release. Thanks again!

@rzhao271
Copy link

rzhao271 commented Dec 3, 2021

Marking as verified based on #5976 (comment)

@rzhao271 rzhao271 added the verified Verification succeeded label Dec 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants