You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OK, it turns out there is a very simple UNIX utility called cut that can find values delimiter separated columns, CSV for example, but also values from colon separated columns.
Using that now:
gpg --with-colons --list-keys $GIT_COMMITTER_EMAIL \
grep ^pub |# Show only public keys
sort |# Sort by key strength
tail -n 1 |# Only use the strongest key (from the last line)
cut -d : -f 5 |# Only output the key ID column
grep -o "\([[:alnum:]]\)\{8\}$"# Only output the last eight characters
gpg
command line utility, if you don't have it already.GPG Keychain
and setup a new private key for the e-mail address you use for commits to Git.git config --global user.signingkey $INSERT_KEY_HERE
git config commit.gpgsign true
.gpg --list-keys
and then usinggpg --armor --export $INSERT_KEY_HERE
.Related reading: Github: Generating a GPG key
The text was updated successfully, but these errors were encountered: