GPGPreferences: pinentry can't store GPG passphrase in macOS Keychain

Ian Valentine's Avatar

Ian Valentine

12 Jun, 2017 07:34 PM

Debug Log



I am trying to store my GPG passphrase in the macOS Keychain so that I can make signed Git commits without having to enter my passphrase each time. The "Store in OS X Keychain" option in GPGPreferences is enabled, yet I cannot find any results in the macOS Keychain for "gnupg". Therefore, when I make a signed Git commit with git commit -S -m "example", I am still prompted for my GPG passphrase.

macOS El Capitan (10.11.6)
GPG version info in attached screenshot

What did you expect instead

I expected the "Store in OS X Keychain" option in GPGPreferences to actually store my GPG passphrase in the macOS Keychain.

Describe steps leading to the problem.

When I make a signed Git commit with git commit -S -m "example", I am prompted for my GPG passphrase.

No other plugins

  1. Support Staff 1 Posted by Steve on 12 Jun, 2017 07:38 PM

    Steve's Avatar

    Hi Ian,

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

    Could you please download and install our latest GPG Suite nightly build and see if the problem persists. That page also has sig and SHA256 to verify the download.

    All the best,
    steve

    Disclaimer: This is a development version which has not been thoroughly tested yet - bugs or crashes are to be expected. Thanks for helping us test.

  2. 2 Posted by Ian Valentine on 12 Jun, 2017 07:58 PM

    Ian Valentine's Avatar

    Hi Steve,

    I tried again with the nightly build, and the problem persists. I tried deleting/clearing the cache in GPGPreferences, then disabling and re-enabling the "Store in OS X Keychain" option, but it is still not appearing in the macOS Keychain. Anything else I should try?

  3. Support Staff 3 Posted by Steve on 21 Jun, 2017 03:31 PM

    Steve's Avatar

    Should you be available, could you hop on our live chat here:
    https://www.hipchat.com/gyyOrLdWt

  4. Support Staff 4 Posted by Steve on 21 Jun, 2017 05:53 PM

    Steve's Avatar

    This question is best asked at the gnupg users mailling list.

  5. Support Staff 5 Posted by Steve on 21 Jun, 2017 06:53 PM

    Steve's Avatar

    Ian, have you ever self-compiled gpg?

    Could you please send a debug log from your affected machine: Open System Preferences > GPGPreferences / GPG Suite > Send Report. Check the box to "attach debug log". Since you already described your issue in this discussion, you don't need to add a lot of detail, but please do add the link to your existing discussion, so I can then merge your debug info with this existing discussion.

    All the best,
    steve

  6. Support Staff 6 Posted by Steve on 26 Jun, 2017 01:56 PM

    Steve's Avatar

    Thanks for the debug log. Have you ever self-compiled gpg?

  7. 7 Posted by Ian Valentine on 26 Jun, 2017 01:57 PM

    Ian Valentine's Avatar

    Hi Steve,

    Pardon the delayed reply!

    I have never self-compiled GPG.

    I just sent a debug log — if there is anything else you need, just let me
    know. Thanks!

    Best,
    Ian

  8. 8 Posted by Ian Valentine on 26 Jun, 2017 02:32 PM

    Ian Valentine's Avatar

    No, I have never self-compiled GPG.

  9. 9 Posted by Mento on 06 Jul, 2017 08:38 AM

    Mento's Avatar

    Hi Ian,

    are you asked for your password, when you sign a file using GPGServices?
    Does this command ask for your password?

    gpg -sa <<<o
    
    Please attach a screenshot from pinentry-mac, when you make a commit and are then asked for your password.

    Regards, Mento

  10. Support Staff 10 Posted by Steve on 18 Aug, 2017 11:09 AM

    Steve's Avatar

    Where you able to get around to test the command posted by mento?

  11. Support Staff 11 Posted by Luke Le on 18 Aug, 2017 11:32 AM

    Luke Le's Avatar

    Hi Ian,

    it looks like you have a very old version of gnupg (v1.4.20) installed via homebrew and I believe when using gpg via terminal (or using git), that gpg will be picked up.
    In order to fix this, please uninstall gpg with the following command:

    brew uninstall gpg
    

    If that's not possible, you could also remove the symlink /usr/local/bin/gpg and make a new one pointing to /usr/local/MacGPG2/bin/gpg:

    rm /usr/local/bin/gpg
    ln -s /usr/local/MacGPG2/bin/gpg /usr/local/bin/gpg
    

    After that, you're passphrase should be properly saved, the next time you're asked for it.

    Hope that helps.

  12. Support Staff 12 Posted by Steve on 16 Feb, 2018 11:00 AM

    Steve's Avatar

    Closing, since no further user feedback was received. Should your problem persist, feel free to re-open this discussion any time.

    All the best, steve

  13. Steve closed this discussion on 16 Feb, 2018 11:00 AM.

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