Member-only story
How to sign commits in Github
Most of the companies or open source projects have a Code of Conduct and usually one of their policies in their Contributor License Agreement (CLA) for code submission, is that your commit need to be signed/verified.
One of the best tools for Mac users is GPG Suite that allows you to store your GPG key passphrase in the macOS Keychain. Once you install it you can create a key pair by filling this form, where you need to use the email used for your github account:
Once the key is created, you need to copy the public key ( Right click and copy ) and in your Github setting page, go to SSH and GPG keys
tab and paste your public key and give it a title
SSH and GPG keys page
Now everytime you want to commit, if you use -S
flag, it will signed your commit
git commit -S -m "YOUR_COMMIT_MESSAGE"
You will be asked for the password you set in GPG Suite and you need to enter it
To configure your Git client to sign commits by default for a local repository, in Git…