mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
2.3 KiB
2.3 KiB
gnupg
One can use /etc/gnupg/gpgconf.conf
to configure gpg and gpg-agent. However, not all options are available ...
gpgconf --list-options gpg
gpgconf --list-options gpg-agent
Using a smartcard:
Note about login shell:
/etc/profile
This file should be sourced by all POSIX sh-compatible shells upon login: it sets up $PATH and other environment variables and application-specific (/etc/profile.d/*.sh) settings upon login.
gpg.conf
Location: ~/.gnupg/gpg.conf
gpg-agent.conf
Location: ~/.gnupg/gpg-agent.conf
# List pinentries: pacman -Ql pinentry | grep /usr/bin/
# If a graphical application shall use ones smartcard one needs to specify a graphical pinentry program.
pinentry-program /usr/bin/pinentry-gnome3
# Enable ssh to use a smartcard for authentification.
enable-ssh-support
Debug options:
debug-pinentry
debug ipc
verbose
log-file /home/__USER__/.gnupg/logfile.log
gnupg
depends on pinentry
and pinentry-gnome3
is part of pinentry
.
$ pacman -F /usr/bin/pinentry-gnome3
usr/bin/pinentry-gnome3 is owned by core/pinentry 1.1.1-1
Graphical Login: /etc/profile.d/*.sh, bashrc, .zshrc.local
- Archwiki: GnuPG#Configure_pinentry_to_use_the_correct_TTY
- These two shell lines are demanded by the gnupg documentation in the chapter
Invoking GPG-AGENT
- man 1 gpg-agent -> EXAMPLES -> set env variable GPG_TTY in your login shell
One's login shell should run this:
GPG_TTY=$(tty)
export GPG_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null
SSH_AUTH_SOCK: /etc/profile.d/*.sh, bashrc, .zshrc.local
- Archwiki: GnuPG#Set_SSH_AUTH_SOCK
One's login shell should run this:
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi