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

Support SSH IdentityAgent config for DevContainers #10697

Open
skrysmanski opened this issue Feb 12, 2025 · 4 comments
Open

Support SSH IdentityAgent config for DevContainers #10697

skrysmanski opened this issue Feb 12, 2025 · 4 comments
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality

Comments

@skrysmanski
Copy link

The DevContainers extension already supports forwarding the ssh agent via the SSH_AUTH_SOCK environment variable.

It would be great if the extension would also support the IdentityAgent config (in ~/.ssh/config) which serves the same purpose as SSH_AUTH_SOCK.

Motivation: I'm using 1Password as my ssh agent. On macOS, it registers itself as ssh agent via the IdentityAgent config instead of SSH_AUTH_SOCK.

Thus, out of the box, my ssh keys are not forwarded to dev containers. Instead I have to export SSH_AUTH_SOCK before launching vscode - which works, but it's not as seamless as it could be.

Side note: The 1Password ssh agent works without problems on Windows.

@vs-code-engineering vs-code-engineering bot added the ssh Issue in vscode-remote SSH label Feb 12, 2025
@skrysmanski
Copy link
Author

Apparently, setting environment variables for GUI apps is quite the pain on macOS. (Judging from all the StackOverflow questions, it seems that Apple changes/breaks how this works with "every" new macOS version). So, this makes this issue even more important, as there is no easy workaround (that survives a reboot).

@joshspicer joshspicer assigned chrmarti and unassigned roblourens and joshspicer Feb 12, 2025
@joshspicer joshspicer added containers Issue in vscode-remote containers and removed ssh Issue in vscode-remote SSH labels Feb 12, 2025
@PeterHindes
Copy link

This is a pretty big problem. Has me looking at other IDEs for work.

@chrmarti
Copy link
Contributor

VS Code reads the env variables from your default shell: You can export SSH_AUTH_SOCK from your ~/.zshrc (depending on which shell is your default) on the Mac and that will be picked up after restarting VS Code.

Reading IdentityAgent from the ~/.ssh/config might be difficult because that can be per host.

@chrmarti chrmarti added the feature-request Request for new features or functionality label Feb 18, 2025
@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone Feb 18, 2025
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants