GPG Keychain: searching for key failed

Slavomir Kocka's Avatar

Slavomir Kocka

11 Jul, 2018 02:37 PM

Please repeat your search and see if it works then. Should the problem persist, file a support request via System Preferences > GPG Suite > Send Report. Please copy the entire error message into the description field and add the search term you used for your query. We recommend to include the debug log, since that provides additional helpful information to solve your problem.

Details:
Search keys failed! (Syntax error in URI)
Code = 46
Error text:
gpg: error searching keyserver: Syntax error in URI
gpg: keyserver search failed: Syntax error in URI

My keyserver was: "pgp.mit.edu"

Expected
successful search

macOS                   10.13.5     17F77
GPG Suite               2018.3      2223    (8d0c266)
GPGMail                 3.0b7       1319    (c2d0df0a)
GPG Keychain            1.4.4       1460    (9010342)
GPGServices             1.11.4      1013    (0b04f6c)
MacGPG                  2.2.8       916     (0ed4a99)
GPG Suite Preferences   2.1.2       997     (1a09bc7)
Libmacgpg               0.8.5       863     (0707962)
pinentry                0.9.7.1     9       (db18340)
  1. Support Staff 1 Posted by Steve on 11 Jul, 2018 02:48 PM

    Steve's Avatar

    Hi Slavomir,

    welcome to the GPGTools support platform. Sorry you are having problems using GPG Suite.

    Unfortunately there are a variety of reasons why a key search can fail.

    Does the problem persist after switching the key server address to hkps://hkps.pool.sks-keyservers.net and trying a few times?

    Is there any chance that you are using Little Snitch or any other firewall on your Mac? If so, please temporarily disable that software and repeat your key search.

    It could be possible that your nameserver is at fault. In that case, please try to change the nameserver (DNS) to 1.1.1.1 and try again.

    If the problem persists, please open Terminal and run the following commands to create some debug output for us:

    echo "debug-level guru" >> ~/.gnupg/dirmngr.conf
    echo "debug-all" >> ~/.gnupg/dirmngr.conf
    echo "log-file /tmp/dirmngr.log" >> ~/.gnupg/dirmngr.conf
    killall dirmngr
    gpg --search-keys [email blocked]
    gpg --keyserver hkps://hkps.pool.sks-keyservers.net --search-keys [email blocked]
    

    After running these commands, please send us the /tmp/dirmngr.log file

    1. open finder and press ⇧⌘G
    2. paste /tmp/dirmngr.log
    3. attach the dirmngr.log file to this discussion

    Once you are done, it's best to remove the debugging option:

    1. open finder and press ⇧⌘G
    2. paste ~/.gnupg/dirmngr.conf
    3. open that file with TextEdit
    4. remove the following lines
      • debug-level guru
      • debug-all
      • log-file /tmp/dirmngr.log

    Now open Terminal.app again and execute the following commands:

    rm /tmp/dirmngr.log killall dirmngr

    Best,
    steve

  2. Support Staff 2 Posted by Luke Le on 11 Jul, 2018 03:11 PM

    Luke Le's Avatar

    Hi Slavomir,

    GnuPG complains because no protocol is given for the keyserver. So you either have to pick the MIT keyserver from our lists of keyserver in System Preferences -> GPG Suite or GPG Keychain -> Preferences or manually change the entry in ~/.gnupg/dirmngr.conf to read:

    keyserver hkps://pgp.mit.edu
    

    Hope that helps.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • 2018-07-11_14-37_DebugInfo.gpg 24.8 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac