twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
12.85k stars 477 forks source link

YubiKey GPG Key for Encryption #2637

Closed ProfessorManhattan closed 1 year ago

ProfessorManhattan commented 1 year ago

Hey, I followed this guide to utilize a YubiKey as a smart card for GPG (https://github.com/drduh/YubiKey-Guide). However, I could not get it working because the key requires a pin to be entered. Is there any way to get a GPG key like this to work with Chezmoi?

I saw in the documentation it says that GPG pins are supported but I was wondering if there was a work around.

twpayne commented 1 year ago

This is a question about GPG, not chezmoi. chezmoi knows nothing about YubiKeys. Encryption is completely delegated to GPG (or age, if you prefer). chezmoi connects standard input, output, and error so GPG should be able to prompt for a PIN.

To help diagnose your problem, you can pass the --debug option to chezmoi apply which will show you exactly how chezmoi is invoking GPG.

twpayne commented 1 year ago

Please re-open if needed.