Skip to content

Allow forwarding of SSH & GPG agents in VSCode extension. #6993

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

Closed
richbayliss opened this issue Dec 1, 2021 · 8 comments · Fixed by #10291
Closed

Allow forwarding of SSH & GPG agents in VSCode extension. #6993

richbayliss opened this issue Dec 1, 2021 · 8 comments · Fixed by #10291

Comments

@richbayliss
Copy link

Is your feature request related to a problem? Please describe

When using the VSCode extension to connect to my workspace, I would like to have my SSH and GPG agents forwarded so that I have access to my signing keys for commits and SSH keys for accessing resources.

Describe the behaviour you'd like

The extension should offer some commands to enable the forwarding of the agents.

Describe alternatives you've considered

This is possible in the stock VSCode Remote SSH extension, which relies on the user's SSH configuration file. My only alternative is to create a GPG subkey and then have this provided as a variable through GitPod, but this is cumbersome and messy when I have a YubiKey attached to my machine ready to be accessed.

@woss
Copy link

woss commented Dec 2, 2021

there is a discussion about similar thing here #666 hope that helps

@stale
Copy link

stale bot commented Mar 6, 2022

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.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 6, 2022
@sagor999
Copy link
Contributor

sagor999 commented Mar 7, 2022

This is related to: #666

@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Mar 7, 2022
@florisvdg
Copy link

(Posting this here, because the other issue is more about GPG in general)

Here's what I'm running into when SSH'ing into a Gitpod workspace with agent forwarding enabled:

  1. In https://gitpod.io/workspaces, click Connect via SSH:

image

  1. SSH into the Gitpod workspace by copying the command shown in the Gitpod UI, but with -A (agent forwarding):
ssh -A <workspace-name>#<autogenerated-access-token>@<workspace-name>.ssh.ws-eu45.gitpod.io
  1. Successfully logged in. Confirm that $SSH_AUTH_SOCK indeed got set correctly:
gitpod ~ $ ls -l $SSH_AUTH_SOCK
srwxr-xr-x 1 gitpod gitpod 0 May 19 20:16 /tmp/ssh-XXXXBaaiFJ/agent.945
  1. Try to communicate to the agent:
gitpod ~ $ ssh-add -l
error fetching identities: communication with agent failed

Is this a bug, known issue, something on my end? Or just unsupported as of now?

@sagor999
Copy link
Contributor

@iQQBot since I think you worked on SSH agent, can you provide some answers to above?

@iQQBot
Copy link
Contributor

iQQBot commented May 30, 2022

SSH Gateway is support ssh-agent-forward (wait this PR deploy) @florisvdg
image

@iQQBot
Copy link
Contributor

iQQBot commented Jun 8, 2022

@florisvdg SSH Gateway is support ssh-agent-forward now, PR is deployed

@iQQBot iQQBot closed this as completed Jun 8, 2022
@woss
Copy link

woss commented Jun 8, 2022

For newcomers to this issue, I just want to add that this solution does not work in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants