gopass icon indicating copy to clipboard operation
gopass copied to clipboard

First `gopass sync` with existing store errors out while still properly importing PGP keys

Open AnomalRoil opened this issue 3 years ago • 2 comments

Summary

Take a new computer / profile and do:

$ go get github.com/gopasspw/gopass
$ git clone [email protected]:yourname/passwords.git ~/.password-store
$ gopass sync

(Notice this password store contains public keys in its .public-key folder, so exportkeys is set to true on my other install.)

On my device this fails:

🚥 Syncing with all remotes ...
[<root>] 
   git pull and push ... OK (no changes)
   importing missing keys ... ❌ [] Failed to get public key for <FINGERPRINT1>: exit status 2: tru::1:1625134922:0:3:1:5
|gpg: keybox '/home/anom/.gnupg/pubring.kbx' created
gpg: /home/anom/.gnupg/trustdb.gpg: trustdb created
gpg: error reading key: No public key

[] Imported public key for <FINGERPRINT1> into Keyring
❌ [] Failed to get public key for FINGERPRINT2: exit status 2: tru::1:1625134922:0:3:1:5
|gpg: error reading key: No public key

[] Imported public key for <FINGERPRINT2> into Keyring
❌ [] Failed to get public key for <FINGERPRINT3>: exit status 2: tru::1:1625134922:0:3:1:5
|gpg: error reading key: No public key

[] Imported public key for <FINGERPRINT3> into Keyring

And yet if I do now a gpg -k the above keys are in the public keyring... Invoking gopass sync again won't fail and everything seems to be fine.

Expected behavior

Do not error out if it actually worked...

Environment

Running on Git Tip on a *nix device.

AnomalRoil avatar Jul 01 '21 11:07 AnomalRoil

First thought: Maybe another caching issue?

dominikschulz avatar Jul 01 '21 11:07 dominikschulz

Not sure to see what you mean?

But I will try later to reproduce on an Ubuntu device, since this was running in a somewhat special env (Linux for ChromeOS...)

AnomalRoil avatar Jul 01 '21 11:07 AnomalRoil