Jump to content

KGPG & Private Key


mtweidmann
 Share

Recommended Posts

I've set up KGpg on my machine and created myself a Private/Public key pair. Now I want to re-build my machine but want to keep the same Private key. I tried clicking the export button and then imported it onto my laptop to test the process. Needless, it didn't work. :(

 

What am I doing wrong?

Link to comment
Share on other sites

Good question! I never realized there is no export secret key menu item.

 

But I suggest you use command line to do it rather than waste time figuring it out.

 

I think $ gpg --export-secret-keys [names] will do it. If you cannot remember you secret key name, you can find it from cli with $ gpg --list-secret-keys I think. Check man:gpg for the definitive answer. That should get you going. You can also copy the key file if you can locate it.

 

Hope this helps. :)

 

p.s. did a bit more checking and here's a more complete instruction:

to export a private key:

gpg --export-secret-key -a "User Name" > private.key

This will create a file called private.key with the ascii representation of the private key for User Name.

It's pretty much like exporting a public key, but you have to override some default protections. There's a note (*) at the bottom explaining why you may want to do this.

 

From GPG Cheatsheet webpage

Edited by kmack
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...