1. Stop GPG Agent

    gpg-connect-agent killagent /bye
    
  2. obsolete option “write-env-file” - it has no effect

    set -gx GPG_TTY (tty)
    set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
    gpgconf --launch gpg-agent