Skip to content

Instantly share code, notes, and snippets.

@kitwalker12
Created April 14, 2017 21:19
Show Gist options
  • Save kitwalker12/a9ccdf078c82f844518326067899ba94 to your computer and use it in GitHub Desktop.
Save kitwalker12/a9ccdf078c82f844518326067899ba94 to your computer and use it in GitHub Desktop.
save and load keys into environment variables from files
// To format a private key into a string literal
cat my_secret.key | sed s/$/\\\\n/ | tr -d '\n'
echo $MY_SECRET_KEY | sed 's/\\n/\n/g' > ~/my_secret.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment