question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

commit error with error: cannot run gpg2: mac Mojave 10.14.3

See original GitHub issue

I updated the Mac version today. And I started to have the problem with git commit . I didn’t have the problem before updating. Error messages are as below.

error: cannot run gpg2: No such file or directory
error: gpg failed to sign the data
fatal: failed to write commit object

Issue 1391 suggest to use $ git config commit.gpgsign false . It works . However, I would need to use it for every repo.

I tried other ways as below and still not working. git config --global gpg.program gpg1

brew install gnupg gnupg2 pinentry-mac git config --global user.signingkey <YOUR_SIGNING_KEY> git config --global commit.gpgsign true git config --global gpg.program gpg

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

8reactions
ghostcommented, Jun 12, 2021

been through same issue try this one git config --global gpg.program $(which gpg) echo "no-tty" >> ~/.gnupg/gpg.conf

2reactions
jimconnercommented, Jul 13, 2021

ghost’s solution worked nicely on my Mac (Big Sur). Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Hub Desktop on Mac, error: cannot run gpg: No such file or ...
After installing big sur, git commit did not work from within vs code and complained about gpg: no such file or directory. This...
Read more >
macOS 10.14.3 Update can't be installed o… - Apple Community
Hi, I have a Mac Pro 2013 and running Mojave 10.14.2. I just downloaded macOS 10.14.3 Combo Update and when I try to...
Read more >
Troubleshooting GPG signed commits on macOS
git commit -S -m "First signed commit" error: gpg failed to sign the data fatal: failed to write commit object.
Read more >
osx - Where to get info about deprecated options of OpenSSL ...
If I try to use -ssl option then it returns the help as an error. But the -ssl option is still there. $...
Read more >
Installing macOS Mojave 10.14 on Proxmox 5.4
iso file extension, this is actually a hard disk image. Fetch the OSK authentication key. macOS checks that it is running on real...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found