Skip to content

Instantly share code, notes, and snippets.

@robinkraft
Last active December 17, 2015 20:19
Show Gist options
  • Save robinkraft/5666682 to your computer and use it in GitHub Desktop.
Save robinkraft/5666682 to your computer and use it in GitHub Desktop.
Generate credentials files for Vertnet data processing
echo "Configuring CartoDB. Please have your credentials ready and press 'enter' to continue."
read na
echo "Oauth key:"
read OAUTH_KEY
echo "Oauth secret:"
read OAUTH_SECRET
echo "Username:"
read USERNAME
echo "Password:"
read CDB_PASSWORD
echo "API key:"
read API_KEY
echo "{
\"key\": \"$OAUTH_KEY\",
\"secret\": \"$OAUTH_SECRET\",
\"user\": \"$USERNAME\",
\"password\": \"$CDB_PASSWORD\",
\"api_key\": \"$API_KEY\"
}" > ~/gulo/resources/creds.json
echo "Configuring AWS. Please have your credentials ready and press 'enter' to continue. Note that backslashes in your AWS credentials may cause errors."
read na
echo "Access key:"
read ACCESS_ID
echo
echo "Secret key:"
read SECRET_KEY
echo
echo "{
\"access-id\": \"$ACCESS_ID\",
\"secret-key\": \"$SECRET_KEY\"
}" > ~/gulo/resources/aws.json
echo "Keep those AWS credentials handy for configuring s3cmd. Press 'enter' to continue"
s3cmd --configure
echo "Credentials are now set up."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment