diff options
author | Joursoir <chat@joursoir.net> | 2022-04-28 13:47:07 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-04-28 13:47:07 +0300 |
commit | ae44913ddd2ab8b17594f0d471f37bd8c50e8a64 (patch) | |
tree | 5579730b2fbebc9d52f95ae2b6b27eef7c7704ba | |
parent | 950b9e4df00631631ab7e33c045e8399e37aff4e (diff) | |
download | dotfiles-ae44913ddd2ab8b17594f0d471f37bd8c50e8a64.tar.gz dotfiles-ae44913ddd2ab8b17594f0d471f37bd8c50e8a64.tar.bz2 dotfiles-ae44913ddd2ab8b17594f0d471f37bd8c50e8a64.zip |
bashrc: configure ssh agent
-rw-r--r-- | .bashrc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -18,3 +18,13 @@ unset file # Add tab completion [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion + +# Use gpg-agent like SSH agent (https://wiki.archlinux.org/title/GnuPG#SSH_agent) +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi + +# Configure pinentry to use the correct TTY +export GPG_TTY=$(tty) +gpg-connect-agent updatestartuptty /bye >/dev/null |