Menu

Error in importing all keys

Kev Sinjo
2016-09-28
2018-08-26
1 2 > >> (Page 1 of 2)
  • Kev Sinjo

    Kev Sinjo - 2016-09-28

    Hi all,

    I can't figure this out.. I have latest version of thunderbird 45.3.0 installed latest enigmail 1.9.5 addon on my Arch Linux.

    Every time I try to import my public and/or private keys in Enigmail Key Management I get an error saying "Error in importing public key"... even the ones I generate new from inside enigmail.. saved as xxx pub-sec.asc.

    What on earth is going on?

    I can import them into Kleopatra fine but I need them to work inside thunderbird with enigmail..

     

    Last edit: Kev Sinjo 2016-09-28
  • Olav Seyfarth

    Olav Seyfarth - 2016-09-28

    Difficult to tell without any log - see menu Enigmail - Debugging - Show Log (you may need to enable Expert options in menu Enigmail - Settings.

     
  • Kev Sinjo

    Kev Sinjo - 2016-09-28

    please take a look at log. It looks like it's imported according to log but its not.

    EDIT: when I issue the command
    "gpg --allow-secret-key-import --import private.key"
    and reload the key cache from enigmail key management I can see the imported key.

     

    Last edit: Kev Sinjo 2016-09-28
  • Ludwig Hügelschäfer

    Thanks for the log.

    It looks like it's imported according to log but its not.

    What you see in the log is the import into a temporary keyring. Enigmail does this to present a preview of the to be imported keys before actually importing into the production-keyring. Do you see this preview? Which version of gpg are you running?

     
  • Patrick Brunschwig

    Please always provide a complete debug log file. It contains a lot of usefule information at the top that helps us to figure out your specific setup.

     
  • Kev Sinjo

    Kev Sinjo - 2016-09-29

    Ludwig,
    No I don't see any preview; only the error msg.
    gnupg 2.1.15-1

    Patrick have attached full log.

    Cheers.

     
  • Kev Sinjo

    Kev Sinjo - 2016-09-29

    anybody??

     
  • Patrick Brunschwig

    Excuse me, but everyone on this forum works on Enigmail during their private time (i.e. non-professional). We can't respond within hours.

     
    • Kev Sinjo

      Kev Sinjo - 2016-10-01

      My apologies Patrick, didn't mean to come out negatively.

       
  • Olav Seyfarth

    Olav Seyfarth - 2016-10-01

    The log says that it DID import one(!) SECRET(!) key (only!) (multiple times).

    I Can't tell you anything about these lines:
    errorHandling.jsm: parseErrorOutputWith: return with c.errorMsg =
    execution.jsm: EnigmailExecution.fixExitCode: agentType: gpg exitCode: 0 statusFlags undefined

     
  • Patrick Brunschwig

    What is the content of your gpg.conf file (~/.gnupg/gpg.conf)? I suspect that the file contains entries that should not be there.

     
  • Kev Sinjo

    Kev Sinjo - 2016-10-03

    Everything looks hashed out. (attached)

    I also get an alert in the advanced menu options saying cannot connect to gpg-agent maybe my system uses a specialised tool for passphrase handling (eg gnome-keyring, seahorse etc)

     
  • Olav Seyfarth

    Olav Seyfarth - 2016-10-03

    Ah, that sounds like as if you should check step by step, please see section
    "Resolving issues with GnuPG 2.x and gpg-agent" on the FAQ.

     
    • Kev Sinjo

      Kev Sinjo - 2016-10-03

      Have followed all steps from 1 to 6 from https://enigmail.net/index.php/en/faq?view=category&id=11

      pinentry opens ok in a window when I issue this command

      pinentry <<EOT
      SETDESC Hello World
      CONFIRM
      EOT

      but afterwards fails when I issue this command:

      gpg-connect-agent <<EOT

      GET_CONFIRMATION Hello
      EOT
      ERR 67108949 No pinentry <gpg agent=""></gpg>

      when I debug with step 7 I get some output to screen like this:

      gpg-agent[1914]: handler 0x3320b2f3700 for fd 5 started
      gpg-agent[1914]: DBG: chan_5 -> OK Pleased to meet you, process 1914
      gpg-agent[1914]: DBG: chan_4 <- OK Pleased to meet you, process 1914
      gpg-agent[1914]: DBG: chan_4 -> GETINFO pid
      gpg-agent[1914]: DBG: chan_5 <- GETINFO pid
      gpg-agent[1914]: DBG: chan_5 -> D 1914
      gpg-agent[1914]: DBG: chan_4 <- D 1914
      gpg-agent[1914]: DBG: chan_5 -> OK
      gpg-agent[1914]: DBG: chan_4 <- OK
      gpg-agent[1914]: DBG: chan_4 -> BYE
      gpg-agent[1914]: DBG: chan_5 <- BYE
      gpg-agent[1914]: DBG: chan_5 -> OK closing connection
      gpg-agent[1914]: handler 0x3320b2f3700 for fd 5 terminated

      Now when trying to import a key my windows error message has now changed to
      "Error - First OpenPGP block not public key block"

       

      Last edit: Kev Sinjo 2016-10-03
      • Ludwig Hügelschäfer

        Let's first clarify the pinentry issue. Do you have an entry in your ~/.gnupg/gpg-agent.conf which specifies which pinentry executable the gpg-agent should use? There must be something like:

        pinentry-program /path/to/your/pinentry-executable

        To find out which pinentry executable is working in your above example type:

        which pinentry

         

        Last edit: Ludwig Hügelschäfer 2016-10-03
        • Kev Sinjo

          Kev Sinjo - 2016-10-03

          I have the following in ~/.gnupg/gpg-agent.conf
          pinentry-program /usr/local/bin/pinentry-gtk

          &
          which pinentry
          /usr/bin/pinentry

           
          • Ludwig Hügelschäfer

            Try to find out if /usr/local/bin/pinentry-gtk is working by typing:

            /usr/local/bin/pinentry-gtk <<EOT
            SETDESC Hello World
            CONFIRM
            EOT

             

            Last edit: Ludwig Hügelschäfer 2016-10-03
            • Kev Sinjo

              Kev Sinjo - 2016-10-03

              Ludwig, thanks for your replies..

              I've realised /usr/local/bin/pinentry-gtk does not exist (I may have copied it verbatim from the tutorial)
              I have now changed gpg-agent to the following
              pinentry-program /usr/bin/pinentry-gtk-2

              now the following command:

              gpg-connect-agent <<EOT

              GET_CONFIRMATION Hello
              EOT
              

              pops up the window correctly.
              but I still can't import the key :(

               
              • Ludwig Hügelschäfer

                Ok, good that pinentry is now working :-)

                So, next step: Key import fails with

                "Error - First OpenPGP block not public key block"

                Is the key stored in non-armoured format? Try to open the to-be-imported file with a text editor. Does it start with something like

                -----BEGIN PGP PUBLIC KEY BLOCK-----
                mQENBE...
                
                 
                • Kev Sinjo

                  Kev Sinjo - 2016-10-03

                  Yes correct it begins like this..

                  -----BEGIN PGP PUBLIC KEY BLOCK-----

                  mI0EV+...

                   
                  • Ludwig Hügelschäfer

                    Did you get the error message "Error - First OpenPGP block not public key block" also, when you generated the above posted full Debug log file? I think not. So please generate a new log while trying to import this file. Thanks.

                     
  • Kev Sinjo

    Kev Sinjo - 2016-10-03

    Ah yes ofcourse..

     
    • Ludwig Hügelschäfer

      There's no import action. Additionally, the first line of your gpg.conf seems to contain an invalid option.

       
      • Kev Sinjo

        Kev Sinjo - 2016-10-03

        The only line in my gpg.conf file is user-agent. If I hash this out (and theres nothing in it) then the "First OpenPGP block not public key" error message is gone but again replaced with "Error in importing public key" which has the import action. I have attached a debug perhaps it may help.

        Appreciate your help alot here Ludwig.

         

        Last edit: Kev Sinjo 2016-10-03
  • Patrick Brunschwig

    "user-agent" is not an option for gpg. It must not be in gpg.conf, or gpg will not work at all.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.