Skip to content

Git UI: SSH path should be configurable (GIT_SSH) #10933

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

Open
four43 opened this issue Apr 18, 2025 · 5 comments
Open

Git UI: SSH path should be configurable (GIT_SSH) #10933

four43 opened this issue Apr 18, 2025 · 5 comments
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality

Comments

@four43
Copy link

four43 commented Apr 18, 2025

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:

  1. Create a repo that has a devcontainer specified
  2. Set GIT_SSH via Docker Compose to my script in my dotfiles, have the devcontainer use docker compose
  3. 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!

  1. Create a repo that has a devcontainer specified
  2. Setting GIT_SSH via postCreateCommand, using something like export 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.

Copy link

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!

@four43
Copy link
Author

four43 commented Apr 18, 2025

Typo - sorry, vs-code-engineering bot

@lszomoru
Copy link
Member

lszomoru commented May 5, 2025

Adding @chrmarti as the issue seems to be devcontainer specific.

@chrmarti
Copy link
Contributor

chrmarti commented May 8, 2025

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.

@chrmarti chrmarti transferred this issue from microsoft/vscode May 8, 2025
@chrmarti chrmarti added containers Issue in vscode-remote containers feature-request Request for new features or functionality labels May 8, 2025
@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone May 8, 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

3 participants