Skip to content

Adding recipient to substore with age+git backend fails at git stage #2526

@jmpolom

Description

@jmpolom

Summary

Adding a recipient to an age encrypted gopass substore fails when gopass attemps to add re-encrypted files to git repo

Steps To Reproduce

  1. gopass clone --crypto age https://git.repo.com/path/to/pass.git test-pass-sub
  2. gopass ls to verify that substore is mounted at test-pass-sub
  3. Verify current recipients with gopass recipients
  4. Attempt to add new recipient with age key: gopass recipients add --store test-pass-sub age1<...>
  5. Reencryption should succeed but observe failure at the stage when changed items are added to git repo:
    Error: failed to add recipient "age1<...>": failed to add "test-pass-sub/secret.age" to git: exit status 128: fatal: pathspec 'test-pass-sub/secret.age' did not match any files
    
  6. Examine the state of the git repo with gopass git --store test-pass-sub status and notice many changed files not staged for commit.

To me it appears git is being called from the wrong directory or paths are being specified incorrectly. The issue can be manually corrected by adding the files with git add, committing and pushing however this should not be necessary.

Expected behavior

Recipient can successfully be added without git error and manual recovery, as appears to be the case for the "root" store.

Environment

  • OS: Fedora 36
  • OS version: Linux hostname 6.1.6-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 14 17:00:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • gopass Version: 1.15.3
  • Installation method: gopass github

Additional context

None.

Metadata

Metadata

Assignees

Labels

bugDefects

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions