We started signing commits at work and as soon as I started generating the first key (GitHub guide), I realized I would be taking extra steps. I don't use my default GitHub email for work commits, I use my work email address. The instructions for setting up commit-signing describe how to make signing automatic, but I wouldn't want to sign my non-work commits with my work key…
So.
Using @sabbour's Quick and easy way to setup signed GitHub commits on MacOS as a starting point, these are the modifications I made so that I could assign a specific GPG key just to my work repos on my machine[1].
- When generating a new GPG key, I generated 2: 1 for my default GitHub email address; 1 for my work email address
- I saved the passphrase f