You must set up signed commits on your laptop. Which method do you pick?
BeginnerScenarioSecrets, Signing and Security
Answer
Situation read → GPG works but is heavier; SSH signing is simpler if you already use SSH.
What I'd do →
git config --global gpg.format ssh.git config --global user.signingkey ~/.ssh/id_ed25519.pub.git config --global commit.gpgsign trueandtag.gpgsign true.- Add the public key to GitHub as a Signing key, separate from the authentication key.
- Test:
git commit --allow-empty -m "test" && git log --show-signature -1.
Why → SSH signing needs no extra tooling and works with hardware keys.
Interview tip → Local verification needs gpg.ssh.allowedSignersFile; GitHub verifies server-side.
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.IntermediateYour GPG signing key expires next week. What is the correct way to handle it?IntermediateA release bot pushes commits, and branch rules require signed commits. How do you handle it?Intermediate