diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-11-07 21:34:05 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-11-07 23:51:54 +0100 |
| commit | 4d0d9a8dfd557ac88f50bd73c786c7216bb01395 (patch) | |
| tree | 8289538b3e509a53bc2fe5dec697f02aebe5b606 | |
| parent | c14ee7365e42e2015ad1b549cc29f6018c5f2bdb (diff) | |
Fix gpg forwarding on .local machines
| -rw-r--r-- | .bash_profile | 9 | ||||
| -rw-r--r-- | .gnupg/gpg-agent.conf | 3 | ||||
| -rwxr-xr-x | .gnupg/pinentry-wrapper | 4 | ||||
| -rw-r--r-- | .stow-local-ignore | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/.bash_profile b/.bash_profile index ef9f275..3e575aa 100644 --- a/.bash_profile +++ b/.bash_profile @@ -18,6 +18,7 @@ fi export CLICOLOR=1 # Mac OS custorm colors (not LS_COLORS as unix) defaultscheme "exfxcxdxbxegedabagacad" export LSCOLORS=gxfxcxdxbxegedabagacad +export BASH_SILENCE_DEPRECATION_WARNING=1 # Silence new macOS warning about bash # Unix/Bash Readline custom colors (created by dircolors in bashrc) export LS_COLORS="$LS_COLORS:di=00;36:ln=00;35:ex=00;31" @@ -36,9 +37,11 @@ export LANG=en_US.UTF-8 GPG_TTY=$(tty) export GPG_TTY unset SSH_AGENT_PID -SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -export SSH_AUTH_SOCK -export BASH_SILENCE_DEPRECATION_WARNING=1 # Silence new macOS warning about bash +# If SSH_AUTH_SOCK is empty, then set it, otherwise it's already set by ForwardAgent +if [ -z "$SSH_AUTH_SOCK" ]; then + SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + export SSH_AUTH_SOCK +fi # ==== Shell Opts shopt -s checkwinsize # check the window size after each command and, if necessary, update LINES/COLUMNS diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf index 93d7907..a6158b7 100644 --- a/.gnupg/gpg-agent.conf +++ b/.gnupg/gpg-agent.conf @@ -1,4 +1,5 @@ -pinentry-program /usr/local/bin/pinentry-wrapper +pinentry-program ~/.gnupg/pinentry-wrapper + default-cache-ttl 3600 default-cache-ttl-ssh 3600 max-cache-ttl 3600 diff --git a/.gnupg/pinentry-wrapper b/.gnupg/pinentry-wrapper index b160cc0..9964241 100755 --- a/.gnupg/pinentry-wrapper +++ b/.gnupg/pinentry-wrapper @@ -8,9 +8,9 @@ case $PINENTRY_USER_DATA in curses) - exec $(brew --prefix)/bin/pinentry-curses "$@" + exec pinentry-curses "$@" ;; *) - exec $(brew --prefix)/bin/pinentry-tty "$@" + exec pinentry-tty "$@" ;; esac diff --git a/.stow-local-ignore b/.stow-local-ignore index e62c1b1..55f3975 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -4,5 +4,3 @@ ^/Brewfile .*.md - -/.gnupg |
