for those who want a quick fix. Eg you need to create a key before pushing a small change on github from a bootable flash.
You can disable pin entry
- create a config file : ~/.gnupg/gpg.conf
- Add these 2 lines to the config file:
- use-agent
- allow-loopback-pinentry
- run the key generation using the
--pinentry-mode
flag as shown below
gpg --full-generate-key --pinentry-mode loopback
This is with the assumption that part of your nixos config file looks like this :
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};