Skip to content

Instantly share code, notes, and snippets.

@kaiix
Created January 18, 2019 10:46
Show Gist options
  • Save kaiix/ed224019d4fd6f6480492777f8f72480 to your computer and use it in GitHub Desktop.
Save kaiix/ed224019d4fd6f6480492777f8f72480 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
SSH_DIR="${HOME}/.ssh"
SSH_CONFIG_BASE64=`curl -s http://vault.in.ein.plus/keys/ein-ci`
mkdir -p "${SSH_DIR}"
chmod 0700 "${SSH_DIR}"
echo "Downloading private keys..."
echo "${SSH_CONFIG_BASE64}" | base64 -d | tar xf - -C "${SSH_DIR}"
chown -R `whoami` "${SSH_DIR}"
echo "Executing command: $@"
eval $@
echo "Removing private keys..."
rm -rf ~/.ssh/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment