-
-
Save indraAsLesmana/d96f3f2cbee074d0e0acec4124a2f3b2 to your computer and use it in GitHub Desktop.
Setting up GPG signature on macOS Sonoma for IDE IntelliJ and XCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install gpg tools | |
https://gpgtools.org | |
# Install gpg | |
brew install gpg | |
# Generating and exporting | |
gpg --gen-key | |
gpg --armor --export <email> > ~/.backups/gpg_git_public.key | |
gpg --armor --export-secret-key <email> > ~/.backups/gpg_git_private.key | |
# Importing | |
gpg --armor --import ~/.backups/gpg_git_private.key | |
gpg --list-secret-keys --keyid-format LONG <EMAIL> | |
# Copy ed25519/<ID> or rsa/<ID> (in the `sec` section) | |
git config --global user.signingkey <ID> | |
git config --global commit.gpgsign true | |
# Copy public key register to gitlab/github (start from -----BEGIN till BLOCK-----) | |
# When copy to clipboard switch to gpgtools app it will detect key and suggest you to save. just saveit. | |
gpg --armor --export <ID> | |
# Set the gpg program used by git | |
git config --global gpg.program "/usr/local/MacGPG2/bin/gpg" | |
# Open project folder in terminal run this command to show prompt input pharase in first run | |
echo "prompt pharase first" | gpg --clearsign |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment