tag:gpgtools.tenderapp.com,2011-11-04:/discussions/beta/1694-gpg-keychain-i-lost-my-private-key-after-installing-gpg-keychainGPGTools: Discussion 2017-04-26T15:34:30Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-15T12:27:30Z2017-04-15T12:27:30ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Hi Marek,</p>
<p>we're very sorry you're having problems with our tools.<br>
The installation of GPG Suite should never touch your keys, it is however possible that your .gnupg folder permissions might be wrong. In which case you should see an empty keylist.</p>
<p>Could you please run the following command in Terminal (easiest to find via Spotlight):</p>
<p>ls -l ~/.gnupg</p>
<p>(Press enter after typing this line) please post the output here.</p>
<p>Thanks!</p></div>Luke Letag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-15T12:57:28Z2017-04-15T12:57:32ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Mareks-Laptok:~ mkwasecki$ ls -l .gnupg<br>
total 1520<br>
srwx------ 1 mkwasecki staff 0 Apr 14 13:32 S.dirmngr<br>
srwx------ 1 mkwasecki staff 0 Apr 14 12:08 S.gpg-agent<br>
srwx------ 1 mkwasecki staff 0 Apr 14 12:07 S.gpg-agent.browser<br>
srwx------ 1 mkwasecki staff 0 Apr 14 12:07 S.gpg-agent.extra<br>
srwx------ 1 mkwasecki staff 0 Apr 14 12:07 S.gpg-agent.ssh<br>
drwx------ 3 mkwasecki staff 102 Apr 14 13:32 crls.d<br>
-rw------- 1 mkwasecki staff 2694 Apr 14 12:05 dirmngr.conf -rw-r--r--@ 1 mkwasecki staff 42 Apr 15 14:09 gpg-agent.conf -rw-------@ 1 mkwasecki staff 5247 Apr 14 14:12 gpg.conf drwx------ 3 mkwasecki staff 102 Apr 14 12:08 openpgp-revocs.d<br>
drwx------ 4 mkwasecki staff 136 Apr 14 12:08 private-keys-v1.d<br>
-rw------- 1 mkwasecki staff 367338 Apr 15 12:57 pubring.gpg -rw------- 1 mkwasecki staff 367338 Apr 15 12:57 pubring.gpg~ -rw------- 1 mkwasecki staff 9853 Apr 14 14:07 pubring.kbx -rw------- 1 mkwasecki staff 6871 Apr 14 13:58 pubring.kbx~ -rw------- 1 mkwasecki staff 0 Apr 14 14:11 secring.gpg -rw------- 1 mkwasecki staff 1320 Apr 15 12:57 trustdb.gpg</p></div>Marek Kwaseckitag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-15T13:01:20Z2017-04-15T13:01:23ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>More info on the case of the installation:<br>
I'm using mkwasecki as nonpriv user and another user with Administrator privs.</p>
<p>I had:<br>
Mareks-Laptok:~ mkwasecki$ gpg --list-secret-keys --keyid-format LONG</p>
<h2><a name="-users-mkwasecki-gnupg-pubring-kbx" class="anchor" href="#-users-mkwasecki-gnupg-pubring-kbx"></a>/Users/mkwasecki/.gnupg/pubring.kbx</h2>
<p>sec rsa2048/40D68876266ACD5A 2017-04-14 [SC] [wygasa: 2019-04-14]<br>
8D2993AE12C82EF035746D9040D68876266ACD5A uid [ absolutne ] Marek Kwasecki <a href="mailto:marek.kwasecki@radpoint.pl">marek.kwasecki@radpoint.pl</a><br>
ssb rsa2048/C4909CD56BD008B6 2017-04-14 [E] [wygasa: 2019-04-14]</p>
<p>and now<br>
Mareks-Laptok:~ mkwasecki$ gpg --list-secret-keys --keyid-format LONG<br>
Mareks-Laptok:~ mkwasecki$</p></div>Marek Kwaseckitag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-15T15:03:36Z2017-04-15T15:03:36ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Hi Marek,</p>
<p>that is in fact very strange. We've never seen a case where GPG Suite was at fault.<br>
Is there any chance you have a no-lock option in your gpg.conf file?<br>
That has been the culprit before.</p>
<p>Could you check your gpg.conf for a lock option?</p></div>Luke Letag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-15T21:36:04Z2017-04-15T21:36:08ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Luke,<br>
you got me on this one. I'm not sure what to check.<br>
If gpg.conf was locked? No it wasn't. (File->Context menu->Get Info)<br>
...and in gpg.conf looking for <em>lock</em> doesn't find nothing. I'm sorry, but can you rephrase the question? Any other test I oculd do or info I could give you?</p></div>Marektag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-18T20:00:01Z2017-04-18T20:00:01ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Hi Marek,</p>
<p>I have noticed something else.<br>
There's a private-keys-v1.d folder in your .gnupg folder. Could you</p>
<pre>
<code>ls -l ~/.gnupg/.private-keys-v1.d</code>
</pre>
<p>that for me?<br>
Is it possible that you created your private keys with gnupg 2.1?<br>
GPG Suite does not yet support gnupg 2.1 and gnupg 2.1 keys are not compatible with gnupg 2.0.x</p></div>Luke Letag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-18T20:20:25Z2017-04-18T20:20:26ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Well.. you are right.</p>
<p>brew installed:<br>
$ gpg2 --version gpg (GnuPG) 2.1.20<br>
libgcrypt 1.7.6</p>
<p>while</p>
<p>$ /usr/local/MacGPG2/bin/gpg2 --version gpg (GnuPG/MacGPG2) 2.0.30<br>
libgcrypt 1.6.6</p>
<p>First used was the v2.1 - mystery solved I guess.</p>
<p>Inside this folder there is<br>
$ ls -l private-keys-v1.d/ total 16<br>
-rw-------@ 1 mkwasecki staff 1173 Apr 14 12:08 5D7121567D3B1A0C36482A21ED2BA61E6A09F0A2.key -rw------- 1 mkwasecki staff 1157 Apr 14 12:08 ADE286BCC14EFA5FE0797EC94B217A09BDFEAA4A.key</p>
<p>That's probably one place I didn't look at dates trusting what cli tool say.</p></div>Marek Kwaseckitag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-19T08:04:07Z2017-04-19T08:04:07ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>GPG Keychain always prefers our own gnupg if available, so it makes sense that the keychain appeared to be empty.<br>
We're currently in the process of testing our suite with gnupg 2.1 and hope to include it in a nightly or test release soon.</p>
<p>We are very relieved that your keys are still there. It would have been the first time, the keys were removed without any input from the user, which of course would have been terrible.</p></div>Luke Letag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-19T08:18:36Z2017-04-19T08:18:40ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>If at all possible it would be awesome to get some warning of such incompatibility/mismatch.</p>
<p>Thanks for the support. I think we can close this one.</p></div>Marek Kwaseckitag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-19T17:52:59Z2017-04-19T17:52:59ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Marek, if you want to transition back to using 2.0.30 in the meantime:</p>
<p>You need to export your sec/pub key which was created with 2.1. In order to do that, 2.1 has to be installed on your system, so you may have to re-install 2.1 in case it was uninstalled. Ensure there is a password set for all secret keys created under 2.1. After that, please export the secret keys:</p>
<p>open terminal.app and paste the following command:</p>
<pre>
<code>gpg2 -a --export-secret-keys > ~/Desktop/secret_keys.asc</code>
</pre>
<p>Please do not deleted anything. Re-import the exported file(s) to GPG Keychain.</p>
<p>Let me know if this worked.</p>
<p>Best,<br>
steve</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-25T22:52:22Z2017-04-25T22:52:26ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Steve,</p>
<p>thank you. That actually worked.</p>
<p>Best regards,<br>
Marek</p></div>Marek Kwaseckitag:gpgtools.tenderapp.com,2011-11-04:Comment/423667302017-04-26T15:34:28Z2017-04-26T15:34:28ZGPG Keychain: I lost my private key after installing GPG Keychain<div><p>Perfect. 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, steve</p></div>Steve