An open API service indexing awesome lists of open source software.

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

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
```