feat(scripts): add gpg key creation script

This commit is contained in:
Felix Schröter 2022-05-06 10:33:36 +02:00
parent f2aa7e6bbf
commit 557d744846
Signed by: felschr
GPG key ID: 671E39E6744C807D

20
scripts/create-gpg-key Executable file
View file

@ -0,0 +1,20 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gnupg
set -euo pipefail
EMAIL=$0
# create master key
gpg2 --quick-gen-key "Felix Schröter <$EMAIL>" ed25519 sign 1y
# create subkeys
gpg2 --quick-add-key KEYID cv25519 encr 1y
gpg2 --quick-add-key KEYID ed25519 auth 1y
gpg2 --quick-add-key KEYID ed25519 sign 1y
# for signing git commits use the sign subkey
# and add the public sign subkey to GitHub/GitLab
# show info
gpg2 --list-keys --with-subkey-fingerprint