Sample Header Ad - 728x90

gpg-agent (macOS) doesn't provide any key for SSH

3 votes
1 answer
2155 views
There are several topics addressing similar issues, but none of the solutions provided there work for my environment, being: - macOS 11.2.3 (MacBookPro M1/Apple silicon) - GnuPG 2.2.27 (installed via Homebrew) - Zsh shell - GPG key with Auth-only subkey for SSH The *~/.gnupg/gpg-agent.conf* file:
pinentry-program /opt/homebrew/bin/pinentry-tty
enable-ssh-support
The *~/.gnupg/sshcontrol* file:
FADD8723...AE7ED (the keygrip retrieved with gpg -K --with-keygrip)
The *~/.zshrc* file:
unset SSH_AGENT_PID
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
I made sure *ssh-agent* is not running (also rebooted the system to be sure). But no keys are found when running:
ssh-add -L
The agent has no identities
What am i missing? EDIT: I should add that I also configured a few Debian 10 systems like this and it works just fine.
Asked by justClouds (71 rep)
Apr 1, 2021, 04:40 PM
Last activity: Jun 27, 2025, 02:07 PM