0

I am new to GPG keys. I created two in WSL to sign my git commits.

However, I cannot use these keys because all sign commands would time out.

gpg-agent

gpg-agent[2416]: gpg-agent running and available

echo "test" | gpg2 --clearsign

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

test gpg: signing failed: Timeout gpg: [stdin]: clear-sign failed: Timeout

gpg2 -K

Output:

/home/ME/.gnupg/pubring.kbx
-----------------------------
sec   rsa4096 2022-01-06 [SC] [expires: 2022-01-07]
      ...
uid           [ultimate] MY NAME <[email protected]>
ssb   rsa4096 2022-01-06 [E] [expires: 2022-01-07]

sec   rsa4096 2022-01-06 [SC] [expires: 2023-01-06]
      ...
uid           [ultimate] MY NAME <[email protected]>
ssb   rsa4096 2022-01-06 [E] [expires: 2023-01-06]

Remove personal GPG key also times out:

gpg --delete-secret-keys [email protected]

gpg: deleting secret key failed: Timeout gpg: deleting secret subkey failed: Timeout gpg: [email protected]: delete key failed: Timeout

  • I tried with gpg and gpg2
  • I added export GPG_TTY=$(tty) to ~/.bashrc
  • I tried with pinentry-tty

Environment:

  • WSL1
  • Ubuntu 18.04.6 LTS

1 Answer 1

0

After restarting Windows, the timeouts were gone.

I did a number of things and I cannot say if any of these thing caused the timeouts to disappear beyond mere restart:

  • disable IPv6 in Windows
sudo update-alternatives --config pinentry
> Choice 3 (tty)
unset DISPLAY
gpg-connect-agent reloadagent /bye

Add to bashrc

gpg-connect-agent updatestartuptty /bye >/dev/null
sudo apt install gnupg2
sudo apt-get install -y pinentry-tty

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .