Docker SSH Agent Forwarding for VSCode Remote Containers #480
Unanswered
paulchubatyy
asked this question in
Q&A
Replies: 1 comment
-
I haven't tried this personally but you should be able to get this working by exposing a volume that maps to the secretive agent and then using that volume path for docker-compose.yml version: '3'
services:
app:
container_name: yourcontainer
environment:
- SSH_AUTH_SOCK=/ssh-agent
image: yourapp
volumes:
- /Users/myuser/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh:/ssh-agent Idea taken from https://www.jamesridgway.co.uk/sharing-an-ssh-agent-between-a-host-machine-and-a-docker-container/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello folks,
I'm using Secretive to store my ssh keys for access, it's an amazing piece of software.
I develop a lot inside VSCode Remote Containers running locally on my laptop. My github SSH keys are stored in Secretive. I can pull/push the code locally. When working from the docker container I cannot pull/push because obviously my SSH agent (that Secretive is running on the laptop) is not available in docker container.
Is there a way to propagate Secretive SSH Agent to be available inside the container and use it there in the same way I use it locally?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions