GPG error
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
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
Support Staff 1 Posted by Luke Le on 04 Oct, 2012 12:47 AM
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!
Support Staff 2 Posted by Steve on 14 Oct, 2012 10:54 PM
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.
Steve closed this discussion on 14 Oct, 2012 10:54 PM.
Mykola Stryebkov re-opened this discussion on 15 Oct, 2012 09:41 PM
3 Posted by Mykola Stryebko... on 15 Oct, 2012 09:41 PM
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.
Support Staff 4 Posted by Steve on 16 Oct, 2012 10:09 AM
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
5 Posted by Микола Стрєбков on 17 Oct, 2012 01:20 PM
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?
Support Staff 6 Posted by Luke Le on 17 Oct, 2012 01:25 PM
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.
7 Posted by Микола Стрєбков on 17 Oct, 2012 01:32 PM
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?
Support Staff 8 Posted by Luke Le on 17 Oct, 2012 01:34 PM
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.
9 Posted by Микола Стрєбков on 17 Oct, 2012 01:57 PM
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
gpg: public key decryption failed: Operation cancelled
gpg: encrypted with 2048-bit RSA key, ID 23477079, created 2012-06-06
gpg: decryption failed: No secret key
Please contact us, including the GPG error message, at support.gpgtools.org
10 Posted by Микола Стрєбков on 17 Oct, 2012 02:08 PM
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.
11 Posted by Микола Стрєбков on 17 Oct, 2012 03:24 PM
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.
Support Staff 12 Posted by Luke Le on 17 Oct, 2012 03:29 PM
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.
13 Posted by Микола Стрєбков on 17 Oct, 2012 03:32 PM
Support Staff 14 Posted by Luke Le on 17 Oct, 2012 05:56 PM
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:
(Please check if the path actually exists and is executable.)
2.) Save the file and run the following command:
After that, restart Mail.app and check if it works.
15 Posted by Микола Стрєбков on 17 Oct, 2012 06:57 PM
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
Support Staff 16 Posted by Luke Le on 17 Oct, 2012 07:04 PM
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
17 Posted by Микола Стрєбков on 17 Oct, 2012 11:24 PM
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.
Support Staff 18 Posted by Luke Le on 17 Oct, 2012 11:27 PM
Ah perfect! Very glad you got it working!
Closing this discussion. Feel free to open a new one anytime!
Luke Le closed this discussion on 17 Oct, 2012 11:27 PM.