# Find the exact signing key Git is using git config --get user.signingkey # Reload the agent and restart pinentry gpgconf --kill gpg-agent gpgconf --launch gpg-agent # Make sure the secret key is actually present gpg --list-secret-keys --keyid-format=long # Test signature in-place echo "test" | gpg --clearsign # If pinentry is missing on macOS: brew install pinentry-mac echo "pinentry-program /opt/homebrew/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf gpgconf --kill gpg-agent