Skip to content
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

Add Docker Mount of SSH hidden directory to docker installation for M… #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

savtrip
Copy link

@savtrip savtrip commented Oct 11, 2024

As per this issue here: basecamp/kamal#218

This exposes the hidden .ssh directory to the docker container. Solved by @gioggi and @stewones. I spent at least 1 hour banging my head wondering why my ssh auth wasn't working. I forgot I was using a Docker container and it wasn't exposing my Mac's SSH keys, I found the linked GitHub issue that made me aware of the issue.

I am happy to discuss any changes.

…acOS

As per this issue here: basecamp/kamal#218

This exposes the hidden `.ssh` directory to the docker container. Solved by @gioggi and @stewones. I spent at least 1 hour banging my head wondering why my ssh auth wasn't working. I forgot I was using a Docker container and it wasn't exposing my Mac's SSH keys, I found the linked GitHub issue that made me aware of the issue.
@strzibny
Copy link

Isn't the right thing to add the key with ssh-add to the agent?

@savtrip
Copy link
Author

savtrip commented Oct 13, 2024

Hey @strzibny thanks for the comment, after further reading I do agree with you, that is the recommend way in the Docker docs (as kamal is already doing in its command in the docs): https://docs.docker.com/desktop/networking/#ssh-agent-forwarding

Instead of closing my pull request I am happy to revise it to leave a note to other people to ensure they load their generated SSH keys to the SSH agent. Perhaps a code example in a note adjacent to the section where it shows the aliases.

Also @strzibny thank you for your book on Kamal, I bought and read it. It had excellent practical examples and flowed well, thanks for putting it together.

@strzibny
Copy link

Yes, I would add a note about loading the keys, perhaps with a link to Docker docs :) and thanks! :)

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

Successfully merging this pull request may close these issues.

2 participants