Git SSH private key not available in devcontainer
My setup:
* Coder v28.0.0 installed using docker compose;
* Workspace created using the default devcontainer template (the one titled "Docker-in-Docker Dev Containers").
According to this documentation: https://coder.com/docs/admin/security/secrets#ssh-keys, git will use the private key generated by Coder to clone my repo (given that I've added the public key to my github account).
This works in the workspace container, but not working within the devcontainer, as the
GIT_SSH_COMMAND and the coder executable are unavailable inside the devcontainer.
As a workaround, I generate a new key pair inside the devcontainer. Any other solution?3 Replies