Last active
March 9, 2023 18:03
-
-
Save abiiranathan/5065dfc7bac0b1f28c49e0d7653959fc to your computer and use it in GitHub Desktop.
Generate GPG Keys for Github to securely sign your commits.
This file contains 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
#!/bin/bash | |
gpg --full-generate-key | |
key_id=$(gpg --list-secret-keys --keyid-format=long | grep sec | awk '{print $2}' | awk -F '/' '{print $2}') | |
echo "Key ID: $key_id" | |
gpgKey=$(gpg --armor --export $key_id) | |
echo $gpgKey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment