Skip to content

Instantly share code, notes, and snippets.

@r0mflip r0mflip/lift_off.sh
Last active Sep 10, 2019

Embed
What would you like to do?
Post install cred-setup
# liftoff 🚀
# On Windows do
# keybase pgp export --secret | gpg --batch --allow-secret-key-import --import --homedir C:\Users\ram
# git config --global --replace-all gpg.program "C:\Program Files (x86)\gnupg\bin\gpg.exe"
# git config --global --replace-all credential.helper manager
lift_off() {
echo "Transfering keys..."
keybase pgp export --secret | \
gpg --batch --allow-secret-key-import --import &>/dev/null
if [ $? -ne 0 ]; then
echo "Failed to import keys"
fi
local name="Ram Damera"
local mail="ramdamera@outlook.com"
local GPG_KEY="$(
printf "%s" "$(
gpg --list-secret-keys --keyid-format=LONG | \
grep "^sec" -m 1 | \
grep -Eo "[A-Z0-9]{16}"
)"
)"
echo "Config-ing..."
git config --global --replace-all user.name "${name}" &>/dev/null
git config --global --replace-all user.email "${mail}" &>/dev/null
git config --global --replace-all user.signingkey "${GPG_KEY}" &>/dev/null
git config --global --replace-all commit.gpgsign true &>/dev/null
echo "Done! Go."
}
lift_off
unset -f lift_off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.