Something went wrong. Try again.
A wrapper for minisign that loads the secret key from 1Password.
Something went wrong. Try again.
Files
README.md
minisign-op #
A wrapper for minisign that loads the secret key from 1Password.
Requirements #
Installation #
- Place
minisign-opsomewhere in your$PATH - Store your Minisign secret key in 1Password:
- Create an item named
minisign.keyin your Personal vault - Attach your secret key file (e.g.,
~/.minisign/minisign.key) to the item with the filenameminisign.key - To use a different vault, item, or filename, set
$MINISIGN_OP_KEY_REFto your secret reference (e.g.,op://Work/my-key/key.sec)
- Create an item named
Replacing minisign transparently #
To use minisign-op as a drop-in replacement for minisign:
- Rename or symlink the original
minisignbinary tominisign-orig - Rename or symlink
minisign-optominisignand place it in a directory that comes before the originalminisignin your$PATH
When invoked as minisign, the script delegates to minisign-orig.
Usage #
minisign-op [<minisign-option>...]
minisign-op exec <cmd> [<arg>...]
The first form delegates to minisign. If the arguments contain -R or -S flags, the secret key is passed via -s; otherwise, minisign is called without the key.
The second form executes <cmd> with $MINISIGN_OP_KEY_DATA set to the secret key data.
Environment variables #
| Variable | Description |
|---|---|
MINISIGN_OP_KEY_REF |
1Password reference to the secret key (default: op://Personal/minisign.key/minisign.key) |
MINISIGN_OP_KEY_DATA |
Set by this script when using minisign-op exec |