https://github.com/brucify/g
GPG shell script for easy encryption, decryption, signing, verification and key management
https://github.com/brucify/g
gpg gpg-encryption gpg-key gpg-keytocard shell-script yubikey
Last synced: 3 months ago
JSON representation
GPG shell script for easy encryption, decryption, signing, verification and key management
- Host: GitHub
- URL: https://github.com/brucify/g
- Owner: brucify
- License: apache-2.0
- Created: 2023-04-20T07:43:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-10T15:18:54.000Z (about 3 years ago)
- Last Synced: 2025-02-23T03:46:26.017Z (over 1 year ago)
- Topics: gpg, gpg-encryption, gpg-key, gpg-keytocard, shell-script, yubikey
- Language: Shell
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# g
Script for easy interaction with basic gpg commands.
## Getting started
```bash
$ curl https://raw.githubusercontent.com/brucify/g/main/g -J -o $HOME/.local/bin/g
$ chmod +x $HOME/.local/bin/g
$ g config signer
$ g config recipient
```
## Usage
```
Usage: g [filename]
Encrypt, decrypt, sign, verify, or print information about GPG keys. Use quotes for arguments with spaces.
Commands:
genkey "John Doe " Generate a new key pair with specified GPG user ID text
addkeys [KEY_ID] Add three subkeys (sign, encrypt, auth) to the specified KEY_ID or the signer key ID in ~/.local/.g/gpg_signer
whoami Display information about the signer key in ~/.local/.g/gpg_signer
recipient Display information about the recipient key in ~/.local/.g/gpg_recipient
encrypt Encrypt a file with recipient specified in ~/.local/.g/gpg_recipient
decrypt Decrypt a file with sender key specified in ~/.local/.g/gpg_signer
decrypt Decrypt all .asc and .gpg files in current directory
sign Sign a file using the signer key in ~/.local/.g/gpg_signer
verify [FILE] Verify a detached signature of a file or the standard input
export signer Export the signer public key in ASCII format
export recipient Export the recipient public key in ASCII format
config signer [KEY_ID] Set or display the signer key ID in ~/.local/.g/gpg_signer
config recipient [KEY_ID] Set or display the recipient key ID in ~/.local/.g/gpg_recipient
keytocard Move all subkeys generated by 'g genkey' to Yubikey
fgr Get the fingerprint of a GPG key with the specified KEY_ID
sshcontrol Update the SSH control file (~/.gnupg/sshcontrol) with the keygrip of the signer key
upgrade Upgrade g to the latest version from GitHub
```