Ensure GPG keygrips used as SSH keys are correctly read

master
Quentin Duchemin 2023-11-01 18:41:46 +01:00
parent 2e7a7dc891
commit 23a14b66ba
2 changed files with 2 additions and 5 deletions

View File

@ -1,2 +1,3 @@
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
# End of file

6
.zshrc
View File

@ -83,13 +83,9 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
export GPG_TTY="$(tty)"
gpg-connect-agent updatestartuptty /bye >/dev/null
export KEYGRIP=8870E499C64EEB7720EBA5A442F4FE90129BFAE3
# Sometimes gpg has a bug and needs to re-import key
alias gbye='gpg-connect-agent "delete_key $KEYGRIP" /bye'
if [ -f ~/.aliases ]; then
. ~/.aliases
fi