Blackbox: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with " == Import keyring == gpg2 --keyring keyrings/live/pubring.kbx --export | gpg2 --import or gpg --keyring .blackbox/pubring.kbx --export | gpg --import GPG=gpg2 blackbox_update_all_files ref: https://github.com/StackExchange/blackbox/issues/184 == Trust all keys == <pre> # The "-E" makes this work with both GNU sed and OS X sed gpg --list-keys --fingerprint --with-colons | sed -E -n -e 's/^fpr:::::::::([0-9A-F]+):$/\1:6:/p' | gpg --import-ownertrust </pre>...")
 
Line 29: Line 29:
  gpg --export-ownertrust && echo $fpr:6: |gpg --import-ownertrust
  gpg --export-ownertrust && echo $fpr:6: |gpg --import-ownertrust


Trust last added key:
<pre>
<pre>
gpg --list-keys --fingerprint \
gpg --list-keys --fingerprint \

Revision as of 22:28, 11 February 2024

Import keyring

gpg2 --keyring keyrings/live/pubring.kbx  --export | gpg2 --import

or

gpg --keyring .blackbox/pubring.kbx --export | gpg --import
GPG=gpg2 blackbox_update_all_files

ref: https://github.com/StackExchange/blackbox/issues/184

Trust all keys

# The "-E" makes this work with both GNU sed and OS X sed
gpg --list-keys --fingerprint --with-colons |
  sed -E -n -e 's/^fpr:::::::::([0-9A-F]+):$/\1:6:/p' |
  gpg --import-ownertrust
gpg --export-ownertrust | sed 's/:.*/:5:/' | gpg --import-ownertrust
echo -e "5\ny\n" |  gpg --homedir . --command-fd 0 --expert --edit-key user@exaple.com trust;
gpg --import <user-id.keyfile>
fpr=`gpg --with-colons --fingerprint <user-id> |awk -F: '$1 == "fpr" {print$10; exit}'`
gpg --export-ownertrust && echo $fpr:6: |gpg --import-ownertrust

Trust last added key:

gpg --list-keys --fingerprint \
    | grep ^pub -A 1 \
    | tail -1 \
    | tr -d ' ' \
    | awk 'BEGIN { FS = "\n" } ; { print $1":6:" }' \
    | gpg --import-ownertrust

ref: https://stackoverflow.com/questions/13116457/how-to-make-auto-trust-gpg-public-key