This guide walks you through installing GPG on macOS, managing keys, creating a new ECC key with Curve25519, and integrating with GitHub for secure commit signing. Letβs dive in! π‘
Install GPG using Homebrew:
brew install gnupgConfirm GPG is installed:
gpg --versionLook for output like gpg (GnuPG) 2.2.x.
Manage your keys easily with these macOS tools:
-
GPA (Gnu Privacy Assistant)
- Install:
brew install gpa - Features: Simple key management and encryption
- Install:
-
Keybase
- Install: Download from keybase.io
- Features: GPG key management with cloud integration
Pick the one that suits your needs! π§ͺ
View your secret keys with:
gpg --list-secret-keys --keyid-format=longsec ed25519/1234567890ABCDEF 2025-05-17 [SC]
Key fingerprint = ABCD 1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234
uid Your Name <[email protected]>
Generate a key using:
gpg --full-generate-key- Choose
(9) ECC and ECC. - Select
(1) Curve 25519. - Set validity (e.g.,
2yor0for no expiration). - Enter your name, email, and an optional comment.
- Set a strong passphrase.
Curve25519 offers modern security and speed! π
- Export your public key:
gpg --armor --export <your-key-id>
- Copy it and add it to GitHubβs GPG settings.
- Set your signing key:
git config --global user.signingkey <your-key-id>
- Enable signing:
git config --global commit.gpgsign true
Your commits are now signed! π
Explore these for more details.
Enjoy secure coding! πβ¨