-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Inconsistent SSH Behavior between Tasks and Shells in VS Code Desktop #16440
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
Comments
I think this would actually be fixed by #16108 |
I can replicate (Loom). It has odd behaviour, as the There are some workarounds for starting the agent in bash_profile: https://code.visualstudio.com/docs/remote/troubleshooting - but I did not try those, yet. @jeanp413 do you know any more? |
Slack discussion : https://gitpod.slack.com/archives/C020VCB0U5A/p1676470768617929 TL;DR: task terminal does not have agent forwarding because they are created before ssh connection happens |
I guess we could make supervisor to install own SSH_AUTH_SOCK and proxy it to IDE via an extension. Kind of the same what we do for gp open/preview. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug description
When you open up VS Code Desktop, Tasks do not have the environment variable
SSH_ AUTH_SOCK
set properly. This means you cannot do SSH Agent forwarding within Tasks, and cannot sign commits using SSH keys.Doing an
env | grep SSH
on a fresh task, you get nothing.Doing an
env | grep SSH
on a created bash shell, you get a socket that works, and works with SSH Agent forwarding.If I try to manually spin up the ssh agent in a Task shell, I get:
$ env | grep SSH $
This shows that there is no
SSH_AUTH_SOCK
set. I can try to create it usingssh-agent
:But if I try to verify my ssh agent forwarding with Github (I have an ssh key on my local machine and ssh agent forwarding enabled):
I still do not get SSH agent forwarding. Once I set the
SSH_AUTH_SOCK
to one created by a Shell terminal (created and assigned automatically within every shell created with the plus sign in VS Code Desktop), I get authentication and signing with SSH agent forwarding both working properly.Steps to reproduce
See the above
Workspace affected
No response
Expected behavior
I expect consistent behavior across Tasks and newly created Shells for ssh agent forwarding. Otherwise I can't do Git commit signing with SSH keys from within the native UI, and have to manually open a shell and type out my commits.
Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: