ayushnix / pass-coffin

A password store extension to hide data inside a signed and encrypted coffin
GNU General Public License v3.0
41 stars 3 forks source link

unable to find the signature for the coffin #14

Open vikasrawal opened 1 year ago

vikasrawal commented 1 year ago

Why am I getting this error as I do pass open: unable to find the signature for the coffin

ayushnix commented 1 year ago

Can you share the output of this command?

env | grep 'PASSWORD_STORE_SIGNING_KEY'
vikasrawal commented 1 year ago

I have this in my cron: @reboot pass close

The idea is that the password store should be closed whenever machine is rebooted.

This seems to cause it. I do not have a problem when I manually do pass close and pass open from the terminal. But I have a problem when I reboot. The password store is closed, and cannot be opened.

I guess passing the environment variables should fix it. Something like this:

@reboot bash -l -c "pass close"

vikasrawal commented 1 year ago

@reboot PASSWORD_STORE_SIGNING_KEY=mykeyid pass close or any other way of specifying the environment variables in the cron does not work.

ayushnix commented 1 year ago

If you're trying to sign and close a password store without any user interaction, your passphrase should be cached in your gpg-agent. If this isn't the case, the signing operation will fail. This is a known issue.

vikasrawal commented 1 year ago

That is right. What is the recommended strategy to close the password store on shutdown/reboot?

ayushnix commented 1 year ago

If you want to close the password store on shutdown/reboot without any user interaction, you'll want to cache your GPG passphrase for an entire session. After that, you can use a systemd service to be executed before shutdown/reboot or the cron method you described to close the password store.

vikasrawal commented 1 year ago

I think the cron method will not work as gpg passphrase is not cached @reboot. One has to create a systemd service that runs before shutdown.