Skip to content

Import and Export private GPG keys

In open-source projects where I need to store credentials for security reasons, I use a tool called blackbox. It uses GPG keys for encryption and key management.

When I now set up a new server and need access to those keys, I need to export them. In order to do that, we first need to find the key we want to use. We can do that by using the following command:

Once your key, export it one of those commands:

Once you moved the secret.asc file to another machine, you can import it again:

And now you are ready to use your private key on the other machine.

[sc name=”src” url=”” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.