Interview Prep/Git & GitHub/Secrets, Signing and Security

Your GPG signing key expires next week. What is the correct way to handle it?

IntermediateScenarioSecrets, Signing and Security
Answer

Situation read → Expired keys lead to "Unverified" for new commits, though old commits stay verified.

What I'd do →

  1. Extend expiry rather than creating a new key: gpg --edit-key <KEYID>, then expire, then save.
  2. Export and upload the updated public key to GitHub.
  3. If the key is compromised, revoke it and create a new one instead.
  4. Document key rotation steps in the team wiki.

Why → Extending keeps the same identity and fingerprint, so downstream trust is untouched.

Interview tip → Know the difference between expiry (routine) and revocation (compromise).

All Git & GitHub questions Roadmap: Git & GitHub

More on Secrets, Signing and Security