chore(gpg): improve gpg-agent command selection

This commit is contained in:
Michele Cereda
2024-04-23 18:15:58 +02:00
parent b0f4cf7872
commit 850195ea77
2 changed files with 20 additions and 1 deletions

View File

@@ -30,6 +30,22 @@
brew install --cask 'gpg-suite-no-mail'
brew install 'gnupg' 'pinentry-mac'
# Launch components.
gpgconf --launch
gpgconf --launch 'gpg-agent'
# Reload components.
gpgconf -R
gpgconf --reload 'gpg-agent'
# Kill components.
gpgconf -K 'all'
gpgconf --kill 'gpg-agent'
# FIXME
gpg-connect-agent updatestartuptty /bye
gpg-connect-agent reloadagent '/bye'
# List existing keys.
gpg -k
@@ -516,6 +532,7 @@ All the references in the [further readings] section, plus the following:
- [Renew GPG key]
- [Archlinux's GnuPG wiki page]
- [GPG agent for SSH authentication]
- [Modify .gnupg home directories]
<!--
References
@@ -523,6 +540,7 @@ All the references in the [further readings] section, plus the following:
<!-- Upstream -->
[commonly seen problems]: https://www.gnupg.org/documentation/manuals/gnupg/Common-Problems.html
[modify .gnupg home directories]: https://www.gnupg.org/documentation/manuals/gnupg/gpgconf.html
[unattended key generation]: https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
<!-- In-article sections -->

View File

@@ -2,6 +2,7 @@
gpg-connect-agent reloadagent '/bye'
gpg-connect-agent updatestartuptty '/bye' \
gpgconf --launch gpg-agent \
&& gpg-connect-agent updatestartuptty '/bye' \
&& set -x 'SSH_AUTH_SOCK' (gpgconf --list-dirs 'agent-ssh-socket') \
&& set -x 'GPG_TTY' (tty)