2

When I try to decrypt a file using gpg, gpg just freezes after asking for my passphrase.

$ gpg foo.asc

You need a passphrase to unlock the secret key for
user: "Edward A. Falk <[email protected]>"
1024-bit ELG key, ID 07D99B37, created 2005-11-28 (main key ID 6F064DF1)

hunter2

wtf?

^C
gpg: signal Interrupt caught ... exiting

$

I've tried a couple of things such as killing gpg-agent, starting it manually from the command line, and so forth. No joy. Is GPG simply broken on Mac? I'm running MacOS Mojave.

I tried updating gpg with brew upgrade gpg and it responded with Warning: gpg 2.2.19 already installed, even though I actually have 2.0.30

gpg --version
gpg (GnuPG/MacGPG2) 2.0.30
libgcrypt 1.7.0
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA, RSA, ELG, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
    CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

I was hoping to use gpg to encrypt some important files, but if I can't decrypt them, it's no use to me. It's a good thing I tested this before I started encrypting stuff.

2
  • I was able to upgrade to gpg 2.2.19 by uninstalling, manually deleting /usr/local/bin/gpg and reinstalling. This only made things worse: gpg 2.2.19 can't handle older pgp keys. I had some older files encrypted with pgp. Feb 25, 2020 at 16:51
  • So reinstall the version you had installed. Your actions are making it work. You should wait for a detailed answer to your question before doing anything else other than restoring the version you had installed
    – Ramhound
    Feb 25, 2020 at 17:45

2 Answers 2

2

Based on your description I see you You have at least 2 installations of gpg. One from brew and the other is installed as a macOS application GPG Suite.

I suggest to choose one of GPG versions you're using and get rid of the other.

I would recommend you GPG Suite because it's easier to manage. There's also GUI GPG Keychain.app and it has also gui Pinentry.

To do so try:

brew uninstall gpg

and just in case you have both formulas installed:

brew uninstall gpg2

Then if you'll still having any issues with gpg try reinstalling GPG Suite.

5
  • Thanks; I'll give it a shot when I'm back at my computer. Feb 25, 2020 at 19:23
  • brew uninstall gpg removed the gpg binary, but left behind various cruft such as /usr/local/Cellar/libgpg-error/1.37. Not sure if I should delete it manually, leave it alone, or if there's another brew command I should be using to get rid of it. Feb 25, 2020 at 22:11
  • 1
    That belongs to another brew package. brew uninstall libgpg-error Feb 25, 2020 at 22:17
  • Ahh, I see. There are a number of dependencies involved. Probably best to nuke them all. Feb 25, 2020 at 22:22
  • Yep. Based on the cruft I'm finding, I definitely had MacGPG2 installed as well as the homebrew variant. There doesn't seem to be an official way to uninstall MacGPG2, and googling only led me to sites that want me to download their uninstaller tools. I don't trust them, but it's probably ok to leave the cruft behind and let MacGPG2 overwrite the files. Feb 25, 2020 at 22:33
0

Try brew reinstall gpg and gpgconf --kill gpg-agent. One of this helped me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .