Skip to content

Instantly share code, notes, and snippets.

@r0mflip r0mflip/
Last active Sep 10, 2019

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"
local name="Ram Damera"
local mail=""
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 "${name}" &>/dev/null
git config --global --replace-all "${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."
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.