You are not logged in.

#1 2022-04-17 14:12:55

thoth
Member
Registered: 2010-01-10
Posts: 60

gpg: signing failed: Timeout [SOLVED]

I had a working gpg agent setup using keychain, and then after updating my machine and rebooting this morning everything appears to be hanging.

$ gpg-agent
gpg-agent[149440]: gpg-agent running and available

# gpg agent appears to be fine, so create a file and try to sign it
$ echo one > test-file1
$ gpg --use-agent --sign test-file1
gpg: signing failed: Timeout

# attempt with gpg2
$ gpg2 --use-agent --sign test-file1
File 'test-file1.gpg' exists. Overwrite? (y/N) y
gpg: signing failed: Timeout
gpg: signing failed: Timeout

# but its just a symlink so that is expected to be the same
$ ls -alh /usr/bin/gpg2
Permissions Size User Date Modified Name
lrwxrwxrwx     3 root 13 Nov  2021  /usr/bin/gpg2 -> gpg

# test keychain
$ eval $(keychain --agents gpg,ssh --nogui --eval id_ed25519 DEADBEEF)
 * keychain 2.8.5 ~ http://www.funtoo.org
 * Found existing gpg-agent: 1446
 * Found existing ssh-agent: 1534
 * Known ssh key: /home/thoth/.ssh/id_ed25519
 * Adding 1 gpg key(s): DEADBEEF
 * Error: Problem adding (is pinentry installed?); giving up

# check for pinentry
$ which pinentry-curses
/usr/bin/pinentry-curses
$ which pinentry       
/usr/bin/pinentry
$ cat ~/.gnupg/gpg-agent.conf
default-cache-ttl 84000
max-cache-ttl 84000
pinentry-program /usr/bin/pinentry-curses

Anyone else having issues with gpg?

some related stuff around the web:
https://forums.gentoo.org/viewtopic-t-4 … art-0.html
https://github.com/funtoo/keychain/issues/61

Last edited by thoth (2022-04-19 16:07:54)

Offline

#2 2022-04-17 14:18:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,209

Re: gpg: signing failed: Timeout [SOLVED]

"using keychain" means what, exactly? If you're talking about a hardware security key, see https://bugs.archlinux.org/task/74423

Edit: oh, I see your edit, you're talking about some funtoo project. Could be the same issue, though.

Last edited by Scimmia (2022-04-17 14:20:06)

Offline

#3 2022-04-17 14:36:41

thoth
Member
Registered: 2010-01-10
Posts: 60

Re: gpg: signing failed: Timeout [SOLVED]

just to be clear, I am using keychain from the funtoo project with a line in zshrc like this:

$ eval $(keychain --agents gpg,ssh --nogui --eval id_ed25519 DEADBEEF)
 * keychain 2.8.5 ~ http://www.funtoo.org
 * Found existing gpg-agent: 1446
 * Found existing ssh-agent: 1534
 * Known ssh key: /home/thoth/.ssh/id_ed25519
 * Adding 1 gpg key(s): DEADBEEF
 * Error: Problem adding (is pinentry installed?); giving up

which I got the `eval` line from:
https://www.funtoo.org/Funtoo:Keychain

And this has been working for years without issue, and only started acting up after this mornings update (using pacman).  Though I am not certain the upgrade is the culprit, I have checked my gpg key does not expire till september, and all permissions on keys in .ssh are tight (i.e. chmod 400 ~/.ssh/id_*), and again the gpg-agent claims to be running.

Offline

#4 2022-04-19 16:07:35

thoth
Member
Registered: 2010-01-10
Posts: 60

Re: gpg: signing failed: Timeout [SOLVED]

SOLVED with todays updates everything is back to normal.  No clue what was wrong.

Offline

Board footer

Powered by FluxBB