TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

`yadm encrypt` fails when there are multiple recipients. #342

Closed binshengliu closed 3 years ago

binshengliu commented 3 years ago

Describe the bug

yadm encrypt fails when there are multiple recipients. With a single recipient it works as expected.

I found PR #139 which added multiple-key support but the code from the PR seems not present in the latest code.

To reproduce

Steps to reproduce the behavior:

  1. Specify multiple recipients under yadm.gpg-recipient in ~/.config/yadm
  2. Run command yadm encrypt
  3. Command fails
    gpg:  XXXX1 XXXX2: skipped: No public key
    gpg: [stdin]: encryption failed: No public key
    ERROR: Unable to write /home/lbs/.local/share/yadm/archive

Environment

TheLocehiliosan commented 3 years ago

Yikes, yes it looks like this was mistakenly dropped at some point during the refactoring for supporting openssl. I also see the fatal flaw in the test case that should have caught this.

Thanks for reporting.

TheLocehiliosan commented 3 years ago

This fix has been merged into the develop branch, and will be part of the next release.

TheLocehiliosan commented 2 years ago

This will become part of 3.1.1, released today