tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/113821-pinentry-is-not-reading-key-from-mac-keychainGPGTools: Discussion 2021-10-19T19:18:05Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/494269692021-10-09T05:33:35Z2021-10-09T16:14:32Zpinentry is not reading key from Mac keychain<div><p>Setup:<br>
I am using XCode Version 13.0 (13A233) on MacOS 11.6 (20G165). My git (v2.33.0) preferences are set to sign commits using my PGP key. My GPG Suite Preferences say to save the secret key in my Mac keychain, and I can confirm that the correct key is present in the keychain in the expected entry.</p>
<p>Observed:<br>
When I try to commit from XCode, pinentry-mac (v1.1.1) doesn’t read the key from the keychain as expected. Instead it displays the password dialog (with the “save in keychain” field checked),and requires the password to be entered. But then it doesn’t update the password in the keychain, and the prompt dialog appears the next time I go to save (and the cache has expired).</p>
<p><strong>Expected</strong><br>
I expect pinentry to read the password from the keychain.</p>
<p><strong>Additional info</strong><br></p>
<pre>
<code>$ /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac --version
pinentry-mac (pinentry) 1.1.1
Copyright (C) 2016 g10 Code GmbH
$ git config --system --get-all credential.helper
osxkeychain
$ git config --global --get-all credential.helper
osxkeychain
/usr/local/share/gcm-core/git-credential-manager-core</code>
</pre>
<p>I have cleared the keychain of passwords, turned the "save to keychain" preference on and off, restarted the machine several times; all with no change in behavior. The password is never saved to the keychain, and when in the keychain is never used.</p>
<pre>
<code>macOS 11.6 20G165
GPG Suite 2021.1 3030 (0e6215293c)
GPG Mail -
GPG Keychain 1.8 1670 (342981ae2c)
GPG Services 2.2 1146 (4bf5d13ec3)
MacGPG 2.2.27 968 (6c0abb39b8)
GPG Suite Preferences 2.5 1176 (7021bee7e2)
Libmacgpg 1.3 944 (dfc721caaf)
pinentry 1.1.1.1 18 (b7195e9d4c)</code>
</pre></div>devtag:gpgtools.tenderapp.com,2011-11-04:Comment/494269692021-10-12T21:06:13Z2021-10-12T21:06:13Zpinentry is not reading key from Mac keychain<div><p>Hi dev,</p>
<p>welcome to the GPGTools support platform. Sorry to hear you are having problems using GPG Suite.</p>
<p>Has this previously worked for you?</p>
<p>Also could you please download and install our <a href="https://releases.gpgtools.org/nightlies/">latest hotfix GPG Suite</a> and see if that solves your problem.</p>
<p>All the best,<br>
Steve</p>
<p>Disclaimer: Hotfixes are GPG Suite builds containing our latest source code, so bugs and crashes may occur.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/494269692021-10-16T17:17:55Z2021-10-16T17:17:55Zpinentry is not reading key from Mac keychain<div><p>Hi Steve,</p>
<p>Installing the 10-15 hotfix - GPG Suite 2021.1 (3038n) - has fixed the problem... thanks!</p>
<p>To answer your original question: I don't know if this problem always existed, because I only recently switched by git settings to auto-sign commits with my PGP key by default, so earlier commits from Xcode would not have seen this issue.</p>
<p>One additional thought: I hadn't installed GPGMail when I first installed the GPG Suite, but I accidentally did when installing the hotfix. Is it possible that the absence of GPG Mail was related to the issue?</p></div>devtag:gpgtools.tenderapp.com,2011-11-04:Comment/494269692021-10-19T19:17:33Z2021-10-19T19:17:33Zpinentry is not reading key from Mac keychain<div><p>Thanks for the update. This is a bit curious. I am certain that GPG Mail would not play into your use case and pinentry would be installed even, if you do not install GPG Mail. You can try that routine with the nightly by deselecting GPG Mail in the custom install option. But I doubt it will change anything.</p>
<p>Glad this is solved for you. I'm closing this discussion. Should you need further assistance or have questions you can re-open this discussion here or open a new one any time.</p>
<p>Best,<br>
Steve</p></div>Steve