Skip to content

Instantly share code, notes, and snippets.

@sysboss sysboss/trust.sh
Created May 15, 2017

Embed
What would you like to do?
Ultimately trust a public key non-interactively mode
#!/bin/bash
# Provide key uid from `gpg --list-keys`
# Based on: https://blog.tersmitten.nl/how-to-ultimately-trust-a-public-key-non-interactively.html
KEY_NAME=""
echo "$( \
gpg --list-keys --fingerprint \
| grep "${KEY_NAME}" -B 1 | head -1 \
| tr -d '[:space:]' | awk 'BEGIN { FS = "=" } ; { print $2 }' \
):6:" | gpg --import-ownertrust;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.