Home

OpenGPG Key and Password Expire Time

By Joel Dare - Updated March 13, 2024 - Written March 11, 2024

I use OpenGPG to sign Git commits on Github and my passwords were expiring too quickly.

I originally tried to increase the key expire times, but this is when the key becomes invalid, not how long the password is cached.

Set Password Expire Time

Set Key Expire Time

You can list your keys with the following command.

gpg --list-keys

You can set how long a key lasts before it expires with the following command. GPG will prompt you for how long to allow the key to be valid.

gpg --edit-key [key-id] expire

Type quit to exit GPG and select y to save.

Build your next site in pure HTML and CSS

Want to build your next site in pure HTML and CSS? Join the free Five-Day Neat Starter Email Course and build a lean, production-ready page before Friday.

Email Me the Crash Course


JoelDare.com © Dare Companies Dotcom LLC

Terms - Privacy