-
-
Save andreadellacorte/03031ab6e20fe437a5a39605da5f20ea to your computer and use it in GitHub Desktop.
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/zsh | |
echo "Start Export Process" | |
echo "Log into Keybase..." | |
keybase login | |
echo "Exporting your PGP keys..." | |
keybase pgp export -o keybase.public.key | |
keybase pgp export -s -o keybase.private.key | |
echo "Importing your Keybase keys..." | |
gpg -q --import keybase.public.key | |
gpg -q --allow-secret-key-import --import keybase.private.key | |
gpg --list-keys | |
read -p 'Key: ' key | |
mkdir ~/.ssh | |
gpg --export "$key" | openpgp2ssh "$key" > ~/.ssh/id_rsa.pub | |
gpg --export-secret-key "$key" | openpgp2ssh "$key" > ~/.ssh/id_rsa | |
chmod 400 ~/.ssh/id_rsa | |
echo "Cleaning up..." | |
rm *.key | |
echo "Success" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment