Git UI: SSH path should be configurable (GIT_SSH)
Does this issue occur when all extensions are disabled?: Yes/No Yes
- VS Code Version: 1.99.3
- OS Version: Debian GNU/Linux 12 (bookworm)
I have a special GIT_SSH script I'd like to use in my personal dotfiles that cycles through keys in my ssh-agent and tries each of them for git operations. This works awesome for flipping between personal Github keys where I interact with OSS and our corporate enterprise account (both hosted on github.com which makes it a WHOLE thing...). Anyway, I need a way to specify a GIT_SSH, after my dotfiles are checked out, which is respected in the Git UI in VSCode. There doesn't seem to be a great way to do this... I have chatted with Copilot VSCode bot and it agrees 🤖
Steps to Reproduce:
- Create a repo that has a devcontainer specified
- Set GIT_SSH via Docker Compose to my script in my dotfiles, have the devcontainer use docker compose
- Checking out my dotfiles fails because the script I am using in GIT_SSH isn't there yet (cart is before the horse here)
OR!
- Create a repo that has a devcontainer specified
- Setting GIT_SSH via
postCreateCommand, using something likeexport GIT_SSH=[...]doesn't seem to have an effect on the Git UI in VSCode. Guessing it's not the same shell/env
Any ideas here? Thanks all.
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.99.3. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
Typo - sorry, vs-code-engineering bot
Adding @chrmarti as the issue seems to be devcontainer specific.
I'm not aware of a simple way of doing this, but you could set GIT_SSH to the path of a symlink to ssh that your dotfiles could then replace.
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!
I think this is essentially the same problem as #10981, and both feel like a bug, not a feature request. Git has well documented environment variables that configure it, and VSCode Remote is not correctly using that configuration, instead doing something non-standard.
This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding
I dislike the policy of needing to brigade issues in order to keep them open. I could go pressure all of my coworkers to thumbs up this issue, or simply "pay for likes", but I would much rather the VSCode team have someone review the issue in question and decide if it is a bug or a feature, and if it is a feature decide if it is one that is desirable at some point and if so put it in the backlog.
:slightly_frowning_face: In the last 60 days, this feature request has received less than 10 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!