Skip to content

GPG signing fails in GUI apps (Obsidian, etc.) due to PATH not being inherited #20

Description

@ulises-c

Problem

GUI apps on macOS (e.g. Obsidian with the Git plugin) do not inherit the shell PATH, so git cannot find the gpg binary and commit signing fails with:

error: cannot run gpg: No such file or directory
error: gpg failed to sign the data

Fix

Set gpg.program to the absolute path in ~/.gitconfig:

gpg.program = /opt/homebrew/bin/gpg

This should be added to the machine setup script or dotfiles so it is applied automatically on new machines.

Also added

Export GPG_TTY=$(tty) in ~/.zshrc for terminal-based GPG sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions