Skip to main content

Cannot run gpg No such file or directory

· One min read
Hung Viet Nguyen
Developing Jest Preview and Vitest Preview

git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - error: cannot run gpg: No such file or directory error: gpg failed to sign the data fatal: failed to write commit object

Answer:

git config --global gpg.program "$(which gpg)"

Reference: https://stackoverflow.com/questions/36941533/git-hub-desktop-on-mac-error-cannot-run-gpg-no-such-file-or-directory