From Google Groups:
I've some trouble adding gpg keys with keychain. I apparently need to
add both primary key and associated subkey to gpg-agent. But using
keychain no matter which key I try to add, it always is the one
associated with the primary key.
This is what I do
Then the pinentry-curses shows
Then I encrypt a file
Now, when I want to decrypt the file:
Again, pinentry-cursus asks my passphrase. This time with another message:
Note the difference in keys between the two dialogs.
If I add the subkey A4548D20, instead of the associated primary key,
after clearing the keychain same behavior occurs.
I tried to figure out what is happening behind the scenes by setting
debug-level to guru and writing everything a separate log file. There I
noticed that indeed two separate keys need to be present in cache of the
Where the former is asked when I use the keychain command
while the latter, when I try decrypting using gpg
Note that if I try:
It only asks the pass-phrase once, the other one is known (as they both
resolve to the same hash! But for decrypting a file it needs another one...
I think I'm missing something... So, how can I properly add my gpg key
to the keychain, such that when decrypting a file I'm not again asked
for my pass-phrase a second time.