Skip to main content

Editing GPG Key Information: A Quick Guide

·281 words·2 mins· loading · loading ·
GPG Linux
UmmIt
Author
UmmIt
Loves to write about technology, and cybersecurity related topics :)
Table of Contents

Introduction
#

First of all, Happy New Year!! :3 This is the first post for the last day of 2023 :D 2023-12-31

Updating Email, User Name, or Expiry Date: Here’s a simple guide on how to edit details like email, user name, and expiry date.

Note: When updating email information, ensure you add a new email before attempting to delete the old one. This maintains the key’s integrity and allows for a smooth transition.

Step 1: Find the Key ID
#

Start by identifying the key ID using the following command:

gpg --list-secret-keys --keyid-format=long

Step 2: Edit the Key
#

Enter the GPG key editing mode with the key ID:

gpg --edit-key <ID>

On the GnuPG prompt, proceed to the next steps.

Step 3: Adding a New Email and Deleting the Old One
#

Inside the GnuPG prompt:

gpg> adduid

Follow the interactive prompts to provide the new details. Confirm and enter the passphrase when prompted. Save the changes:

gpg> save

To delete the old email, ensure you have added a new email first:

gpg> deluid

Step 4: Updating Expiry Date
#

To change the expiry date:

gpg> expire

Follow the interactive prompts for details. To modify the ssb expiry date, select the uid (for example, uid 1):

gpg> uid 1
gpg> expire

Adjust the date and save:

gpg> save

Step 5: Verify Changes
#

Confirm that the changes are correct by checking the signed commit messages:

git log --show-signature

Conclusion
#

This step-by-step guide you to confidently navigate the process of editing GPG key information, whether you need to update your email, user name, or expiry date.

Reference
#

Related

A Guide to GPG Keys: Managing, Importing, and Verifying
·434 words·3 mins· loading · loading
GPG Linux
Vim: A Quick Guide to Efficient Text Editing
·538 words·3 mins· loading · loading
Vim Linux Terminal
Fixing Security Vulnerabilities in systemd-boot (/boot) - No longer accessible to normal users: A Step-by-Step Guide
·466 words·3 mins· loading · loading
Linux Bootctl Boot-Loader
Unlocking a Linux User After Too Many Failed Login Attempts
·738 words·4 mins· loading · loading
Faillock Linux
Step-by-Step Guide: Creating a Swap File on Your Linux VPS
·1538 words·8 mins· loading · loading
VPS SSH Linux Swap
Resizing LVM and LUKS Encrypted Btrfs Filesystem
·383 words·2 mins· loading · loading
BTRFS LUKS Linux