Skip to content

ssh agent forwarding faulty #37

Description

@0x7231636b

Trying to use git with ssh keys within the devcontainer (git extension or terminal) does not work.

In a terminal in VSCodium connected to a devpod container typing ssh-add -l should show the list of my loaded ssh keys passed through from my host machine. But it is not able to show anything, it seems that there is a local ssh agent running instead of the forwarding to the host machine.

Further investigation was even more irritating, when investigating the devpod with ssh project.devpod and then typing ssh-add -l (within the container terminal) I was able to verify that in fact the devpod itself forwards the ssh related stuff from my host machine.

This left me confused since I assumed that I only connect to the container itself and all things in VSCodium from then on are executed directly within the container (like I did with connecting manually into the container while troubleshooting).

tl;dr

ssh-add -l shows different results depending on the way I am connected to the DevPod container.

machine command result
host ssh-add -l Key ABC
devpod container (connected via ssh shell) ssh-add -l Key ABC
VSCodium devpod container session terminal ssh-add -l Error connecting to agent: No such file or directory

The user within the container is root, and it is in fact the same (and only) container I can connect to, so I expected the same resuts.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions