dotfiles/bin/executable_gpg-change-card
Oliver Weyhmueller 4ec771a1c7
Update
* .gitconfig
* .chezmoi.yaml.tmpl
* .tmux.conf
* .vim
* .ssh
* .p10k.zsh
2022-01-30 20:56:16 +01:00

9 lines
286 B
Bash

#!/usr/bin/env bash
keyid=YOUR_KEY_ID_GOES_HERE
gpgconf --kill gpg-agent
cd "$(gpgconf --list-dirs homedir)/private-keys-v1.d"
gpg -K --with-keygrip --with-colons "$keyid" | \
awk -F: '/^grp/ { print $10".key"; }' | \
xargs rm -vf
gpg-connect-agent "scd serialno" "learn --force" /bye