Reputation: 2152
I'm trying to use keychain(1)
with my GnuPG key on Debian Testing. However, I get the following message with this command:
$ keychain --agents gpg MYPGPKEY
* keychain 2.8.2 ~ http://www.funtoo.org
* Starting gpg-agent...
* Warning: can't find MYPGPKEY; skipping
where MYPGPKEY
is my actual key.
I can check that such key exits with the following command:
$ gpg --list-keys MYPGPKEY >/dev/null 2>&1 && echo "key exists"
key exists
How can I add my gpg key with keychain?
Upvotes: 4
Views: 1990
Reputation: 961
Specifying keyid-format LONG
in ~/.gnupg/gpg.conf
didn't work for me, but (per https://github.com/funtoo/keychain/issues/107#issuecomment-806252699) specifying --agents "gpg,ssh"
in keychain
's arguments (in my case, keychain --eval --agents "gpg,ssh" id_rsa id_ed25519 DEADBEEF
) did the trick.
Upvotes: 1
Reputation: 2692
It looks like an output parsing incompatibility between keychain 2.8.2
and gpg 2.2.4
, the two versions used in Ubuntu 18.04
I added the following to my ~/.gnupg/gpg.conf
, which fixed the issue:
keyid-format LONG
Source: https://github.com/funtoo/keychain/issues/107
Upvotes: 2
Reputation: 21
I believe the problem may be associated with your gpg
and keychain
version possible incompatibility. I can see that you are using 2.8.2 version which displays this error message that 2.7.0
doesn't.
Stable version of Debian is using gnupg
1.4.18-7+deb8u3enter code here
and Testing is using 2.1.18-6
, which differ a lot.
Are you using your private key ID or your subkey ID?
My suggestion is changing the key ID provided to keychain
Upvotes: 1