GPG error

Mykola Stryebkov's Avatar

Mykola Stryebkov

04 Oct, 2012 12:41 AM

GPG error message:
Error opening terminal: unknown.
gpg-agent[3381]: command get_passphrase failed: End of file
gpg: problem with the agent: End of file
gpg: encrypted with 4096-bit ELG key, ID C43291E9, created 2009-08-19

  "Mykola Stryebkov (Seal) <[email blocked]>"

gpg: public key decryption failed: Operation cancelled
gpg: encrypted with 2048-bit RSA key, ID 23477079, created 2012-06-06

  "Sanya <[email blocked]>"

gpg: decryption failed: No secret key

  1. Support Staff 1 Posted by Luke Le on 04 Oct, 2012 12:47 AM

    Luke Le's Avatar

    Hi Mykola,

    could you please install the latest GPGTools-Installer from nightly.gpgtools.org?
    It should fix your problem.

    Let us know if it works!

  2. Support Staff 2 Posted by Steve on 14 Oct, 2012 10:54 PM

    Steve's Avatar

    No further user feedback. Closing.

    @Mykola: Should your problem persist, feel free to re-open this discussion any time.

    All the best,
    steve


    Please consider a donation. We do all this in our spare time.

  3. Steve closed this discussion on 14 Oct, 2012 10:54 PM.

  4. Mykola Stryebkov re-opened this discussion on 15 Oct, 2012 09:41 PM

  5. 3 Posted by Mykola Stryebko... on 15 Oct, 2012 09:41 PM

    Mykola Stryebkov's Avatar

    Oops,

    My letter was rejected by your (probably) email server. I can provide rejection details if anyone interested.

    On the matter:

    I have GnuPG 1.4.12 installed from MacPorts, not from GPGTools.
    And I would like to use only GPGMail.

  6. Support Staff 4 Posted by Steve on 16 Oct, 2012 10:09 AM

    Steve's Avatar

    Hey Mykola,

    any reason, why you don't want to use MacGPG2? You could download our nightly installer. When installing choose customize install and then select only the the tools you want to have installed on your system. By the way, which OS X are you using?

    Best,
    steve

  7. 5 Posted by ?????? ???????? on 17 Oct, 2012 01:20 PM

    Микола Стрєбков's Avatar

    Hey Steve,

    The only reason is I already have GnuPG in my system and I'm not sure I need another one. Any problem with using existing GnuPG?

  8. Support Staff 6 Posted by Luke Le on 17 Oct, 2012 01:25 PM

    Luke Le's Avatar

    Hey Mykola,

    it's not per se a problem to use your own gnupg. But using gnupg 1.x is kind of a problem, if the agent doesn't work properly. Gnupg 2.x starts the agent on demand, so the agent is much more reliable.

    You could check what happens if you wanna use gnupg via Terminal and see if that works.
    But we really encourage you to use our installer, or our version of MacGPG1 (which you can find on nightly.gpgtools.org) because it takes these issues into consideration and works around them if necessary.

  9. 7 Posted by ?????? ???????? on 17 Oct, 2012 01:32 PM

    Микола Стрєбков's Avatar

    Hey,

    I'm using GnuPG extensively and I'm sure it works. Can you point me to some documentation on how to setup gpg (gpg-agent?) 1.x properly to make it work with GPGMail?

  10. Support Staff 8 Posted by Luke Le on 17 Oct, 2012 01:34 PM

    Luke Le's Avatar

    Could you please check your Console.app log to find any errors related to gpg-agent
    It's really hard to guess without having more info.

  11. 9 Posted by ?????? ???????? on 17 Oct, 2012 01:57 PM

    Микола Стрєбков's Avatar

    When I open Mail.app pointed to encrypted email I see:

    17.10.12 16:54:09,512 Mail[52456]: Using V2 Layout
    17.10.12 16:54:09,527 Mail[52456]: objc[52456]: Class FlippedView is implemented in both /Applications/Mail.app/Contents/MacOS/Mail and /Library/Mail/Bundles/GPGMail.mailbundle/Contents/MacOS/GPGMail. One of the two will be used. Which one is undefined.
    17.10.12 16:54:09,532 Mail[52456]: Debug Log enabled: NO
    17.10.12 16:54:09,631 Mail[52456]: Loaded GPGMail 2.0b5 ML3
    17.10.12 16:54:10,191 Mail[52456]: CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 168. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
    17.10.12 16:54:11,318 Mail[52456]: *** -[IADomainCache init]: IA domains cache is out of date.

    And in the header of a letter I see a yellow banner "Decryption failed with unknown error". When I click on "Show details" I see the following:

    An unknown error occurred while decrypting this message.

    GPG error message:
    Error opening terminal: unknown.
    gpg-agent[52465]: command get_passphrase failed: End of file
    gpg: problem with the agent: End of file
    gpg: encrypted with 4096-bit ELG key, ID C43291E9, created 2009-08-19

      "Mykola Stryebkov (Seal) <[email blocked]>"
    

    gpg: public key decryption failed: Operation cancelled
    gpg: encrypted with 2048-bit RSA key, ID 23477079, created 2012-06-06

      "Sanya <[email blocked]>"
    

    gpg: decryption failed: No secret key

    Please contact us, including the GPG error message, at support.gpgtools.org

  12. 10 Posted by ?????? ???????? on 17 Oct, 2012 02:08 PM

    Микола Стрєбков's Avatar

    BTW, I can send encrypted (not signed :-) emails w/o any problems. Wich means, afaiu, that GPGMail uses installed GnuPG and the only problem is to get a password to decrypt a private key.

  13. 11 Posted by ?????? ???????? on 17 Oct, 2012 03:24 PM

    Микола Стрєбков's Avatar

    Correction:

    Errors above are shown when GnuPG2 is installed.
    When I have GnuPG 1.4.12 only I see in /var/log/system.log:

    Oct 17 18:18:49 Taran.local Mail[98284]: [GPGMail] Task helper Exception: *** setObjectForKey: object cannot be nil (key: _NSTaskExecutablePath)

    At the same time I still able to send encrypted emails.

  14. Support Staff 12 Posted by Luke Le on 17 Oct, 2012 03:29 PM

    Luke Le's Avatar

    Ah ok, I think I have an idea what's not working.
    Where does MacPorts install gnupg again?

    Could you please make sure that you have the gpg binary in one of the following locations:
    @"/usr/local/bin", @"/usr/local/MacGPG2/bin", @"/usr/local/MacGPG1/bin", @"/usr/bin", @"/bin", @"/opt/local/bin", @"/sw/bin"

    If that's the case it might be related to the pinentry program.

  15. 13 Posted by ?????? ???????? on 17 Oct, 2012 03:32 PM

    Микола Стрєбков's Avatar

    which gpg /usr/local/bin/gpg which pinentry pinentry not found

  16. Support Staff 14 Posted by Luke Le on 17 Oct, 2012 05:56 PM

    Luke Le's Avatar

    Ok, so I think the following steps should fix this problem for you.
    Due to the sandboxing changes introduced by Mountain Lion, we still have to fix the way we try to find the pinentry program.

    1.) Edit (or create) gpg-agent.conf in ~/.gnupg/gpg-agent.conf and add the following line:

    pinentry-program /Library/Mail/Bundles/GPGMail.mailbundle/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac
    

    (Please check if the path actually exists and is executable.)

    2.) Save the file and run the following command:

    killall -9 gpg-agent
    

    After that, restart Mail.app and check if it works.

  17. 15 Posted by ?????? ???????? on 17 Oct, 2012 06:57 PM

    Микола Стрєбков's Avatar

    It works! Thank you!

    But. To make it work I installed GnuPG2 from macports and made a symlink from /usr/local/bin/gpg2 to /usr/local/bin/gpg

    And now I can see a cleartext but can't see if letter encrypted and signed.

    Also, I have a question: how to make a system to remember my private key's password for some time

  18. Support Staff 16 Posted by Luke Le on 17 Oct, 2012 07:04 PM

    Luke Le's Avatar

    Oh interesting you needed the symlink.

    What exactly doesn't work now?

    As for the password question, you can set that via GPGPreferences (download from https://github.com/downloads/GPGTools/GPGPreferences/GPGPreferences...)

    You can either choose to save the password in OS X keychain or you can choose to remember the password for some time. Default is 1 hour if I'm not mistaken

  19. 17 Posted by ?????? ???????? on 17 Oct, 2012 11:24 PM

    Микола Стрєбков's Avatar

    Thank you!

    Now everything works fine. I just set up an OS X login hook to start gpg-agent on login store pins.

    And yes, gnupg2 from mac ports does not create $PREFIX/bin/gpg binary, it does create gpg2. That's the reason why I had to symlink it.

  20. Support Staff 18 Posted by Luke Le on 17 Oct, 2012 11:27 PM

    Luke Le's Avatar

    Ah perfect! Very glad you got it working!

    Closing this discussion. Feel free to open a new one anytime!

  21. Luke Le closed this discussion on 17 Oct, 2012 11:27 PM.

Comments are currently closed for this discussion. You can start a new one.

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