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 →
- Extend expiry rather than creating a new key:
gpg --edit-key <KEYID>, thenexpire, thensave. - Export and upload the updated public key to GitHub.
- If the key is compromised, revoke it and create a new one instead.
- 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).
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerA release bot pushes commits, and branch rules require signed commits. How do you handle it?Intermediate