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

Forward GPG agent instead of requiring the exported key #59

Open
vv9k opened this issue Jul 16, 2021 · 0 comments
Open

Forward GPG agent instead of requiring the exported key #59

vv9k opened this issue Jul 16, 2021 · 0 comments
Labels
C-enhancement Categiry: New feature or request

Comments

@vv9k
Copy link
Owner

vv9k commented Jul 16, 2021

This would be much more elegant and would act similar to the SSH socket that got introduced in #58 . This seems like the best guide to forwarding the GPG agent.

From initial tests it did not work for me when I did the following:

# Add required option to sshd config
sudo echo "StreamLocalBindUnlink yes" >> /etc/ssh/sshd_config
sudo systemctl restart sshd

# make sure the agent is running on the host
gpg-connect-agent /bye 

# start the container
docker run -it --rm -v $(gpgconf --list-dirs agent-extra-socket):/root/.gnupg/S.gpg-agent debian:10

And in the container

chmod 700 /root/.gnupg
chown root:root /root/.gnupg/S.gpg-agent 
apt -y update && apt -y install gnupg2
gpg2 --list-keys

Will have to take a deeper look at this.

@vv9k vv9k added the C-enhancement Categiry: New feature or request label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Categiry: New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant