https://github.com/sharpjs/pinentry-op
A GPG pinentry program that retrieves a passphrase from 1Password
https://github.com/sharpjs/pinentry-op
Last synced: 6 months ago
JSON representation
A GPG pinentry program that retrieves a passphrase from 1Password
- Host: GitHub
- URL: https://github.com/sharpjs/pinentry-op
- Owner: sharpjs
- License: mit
- Created: 2024-09-15T16:20:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-24T12:54:43.000Z (over 1 year ago)
- Last Synced: 2025-05-31T03:33:02.458Z (8 months ago)
- Language: Rust
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pinentry-op
A quickly-thrown-together GPG pinentry program that knows only how to retrieve
a predetermined passphrase from 1Password.
## Installation
There is no easy installer yet. There might never be one.
- Ensure prerequisites are installed: GPG, 1Password, 1Password CLI.
- Build.
```sh
cargo build --release
```
- Create a file `pinentry-op.cfg` in the same directory as the binary. The
content of the file should be the 1Password item reference of the passphrase.
For example:
```
op://MyVault/MyItem/password
```
- Edit `gpg-agent.conf` to point to the binary.
```properties
pinentry-program D:\Code\Self\pinentry-op\target\release\pinentry-op.exe
```
# Testing
Run this:
```sh
echo "" > test.txt
gpgconf --reload gpg-agent
gpg --sign --dry-run --yes test.txt
```
1Password should prompt to authorize gpg-agent for CLI access.
