Skip to content

Instantly share code, notes, and snippets.

@iamferreirajp
Created August 27, 2017 23:53
Show Gist options
  • Save iamferreirajp/e9936f149aa0de1fe806d7b3078aad62 to your computer and use it in GitHub Desktop.
Save iamferreirajp/e9936f149aa0de1fe806d7b3078aad62 to your computer and use it in GitHub Desktop.
#!/bin/bash
git remote add heroku https://git.heroku.com/gcs01-iamferreirajp-circleci.git
wget https://cli-assets.heroku.com/branches/stable/heroku-linux-amd64.tar.gz
mkdir -p /usr/local/lib /usr/local/bin
tar -xvzf heroku-linux-amd64.tar.gz -C /usr/local/lib
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
cat > ~/.netrc << EOF
machine api.heroku.com
login $HEROKU_LOGIN
password $HEROKU_API_KEY
machine git.heroku.com
login $HEROKU_LOGIN
password $HEROKU_API_KEY
EOF
# Add heroku.com to the list of known hosts
ssh-keyscan -H heroku.com >> ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment