Skip to content

Clean up exported public keys if a recipient is removed doesn't work on Windows #2371

@Mahagon

Description

@Mahagon

Summary

gopass sync doesn't clean up public keys correctly on Windows. I Update from 1.14.5 to 1.14.8.
I also tried the 1.24.6 binary, it has the same behavior as the 1.14.8.

Steps To Reproduce

run gopass sync:

🚥 Syncing with all remotes ...
[<root>]
   gitfs pull and push ... OK (no changes)
   importing missing keys ... OK
   exporting missing keys ... ❌ Failed to remove extra key ".public-keys/0x7BCBAF7F05E47C4B": remove C:\Users\mail\AppData\Local\gopass\stores\root\.public-keys\.public-keys\0x7BCBAF7F05E47C4B: The system cannot find the path specified.❌ Failed to remove extra key ".public-keys/0xD4E677E25A989940": remove C:\Users\mail\AppData\Local\gopass\stores\root\.public-keys\.public-keys\0xD4E677E25A989940: The system cannot find the path specified.❌ Failed to remove extra key ".public-keys/redacted": remove C:\Users\mail\AppData\Local\gopass\stores\root\.public-keys\.public-keys\redacted: The system cannot find the path specified.nothing to do
   done
✅ All done

Expected behavior

Clean up exported public keys if a recipient is removed

Environment

  • OS: Windows 11
  • gopass Version: 1.14.8
  • Installation method: chocolatey

Additional context

I would guess that #2328 is at fault.

The public keys are in C:\Users\mail\AppData\Local\gopass\stores\root\.public-keys\ and not in C:\Users\mail\AppData\Local\gopass\stores\root\.public-keys\.public-keys\

gopass config.yaml

autoclip: false
autoimport: false
cliptimeout: 45
exportkeys: true
nopager: false
notifications: false
parsing: true
path: C:\Users\mail\AppData\Local\gopass\stores\root
safecontent: false
mounts: {}

Metadata

Metadata

Assignees

Labels

bugDefects

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions