Try forcing pinentry via cli flags

This commit is contained in:
Hans Muendelein 2024-11-02 22:49:06 +01:00
parent a613e1736e
commit ecd5db2de6
1 changed files with 7 additions and 1 deletions

View File

@ -12,8 +12,14 @@ pkgs.mkShell {
shellHook = '' shellHook = ''
mkdir -p $HOME/.gnupg mkdir -p $HOME/.gnupg
echo "pinentry-program = ${pkgs.pinentry-curses}/bin/pinentry-curses" > $HOME/.gnupg/gpg-agent.conf echo "pinentry-program = ${pkgs.pinentry-curses}/bin/pinentry-curses" > $HOME/.gnupg/gpg-agent.conf
echo "debug-pinentry" >> $HOME/.gnupg/gpg-agent.conf
echo "debug ipc" >> $HOME/.gnupg/gpg-agent.conf
echo "verbose" >> $HOME/.gnupg/gpg-agent.conf
echo "enable-ssh-support" >> $HOME/.gnupg/gpg-agent.conf
chmod 700 /root/.gnupg chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/gpg-agent.conf chmod 600 /root/.gnupg/gpg-agent.conf
gpgconf --reload gpg-agent
# Set the SSH agent socket for gpg-agent # Set the SSH agent socket for gpg-agent
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
@ -27,7 +33,7 @@ pkgs.mkShell {
gpg --card-status gpg --card-status
gpgconf --kill gpg-agent gpgconf --kill gpg-agent
gpg-agent --daemon gpg-agent --daemon --pinentry-program="${pkgs.pinentry-curses}/bin/pinentry-curses"
touch dummy touch dummy
gpg -r hans --encrypt dummy gpg -r hans --encrypt dummy