https://github.com/boon-code/gpg-keyring
Simple keyring backend using the file system and gpg.
https://github.com/boon-code/gpg-keyring
Last synced: 2 days ago
JSON representation
Simple keyring backend using the file system and gpg.
- Host: GitHub
- URL: https://github.com/boon-code/gpg-keyring
- Owner: boon-code
- License: mit
- Created: 2025-09-23T21:43:58.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-23T22:58:25.000Z (9 months ago)
- Last Synced: 2025-10-07T05:35:50.968Z (8 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GPG Keyring
===========
Simple keyring implementation using `gpg` to store encrypted credentials on the file system.
# Setup
1. Install this package (f.e. into a virtual environment)
2. Create the file as specified by `keyring diagnose`. The output should look similar to this:
config path: /.config/python_keyring/keyringrc.cfg
data root: /.local/share/python_keyring
3. Use this snippet to configure this keyring backend as default:
[backend]
default-keyring=gpg_keyring.GpgKeyring
4. Configure your e-mail address in the file `~/.gpg_keyring/gpg_keyring.conf`:
[settings]
email = john.doe@domain.com
Now you should be able to use the `gpg_keyring` backend using commands like this:
- `keyring set ` to set a password
- `keyring get ` to retrieve the password
- `keyring del ` to delete an entry
# Internals
Credentials and local settings are all stored in your home directory in the directory `~/.gpg_keyring/`:
- `gpg_keyring.conf`: configuration file for this plugin
- ``: credentials for the service. The service name is turned into a SAH-256 hash and used to as the name of the file containing the credentials.
The content of the credentials files is a base64 encoded cipher text of the following json structure:
{
"username": "",
"password": ""
}
... the user name `` and the password `` previously set via `keyring set ` with the password `` provided via `stdin`.