Skip to content

Instantly share code, notes, and snippets.

@ricardolsmendes
Created December 7, 2022 19:11
Show Gist options
  • Save ricardolsmendes/dd4df817cce582fd59c5b533acf88039 to your computer and use it in GitHub Desktop.
Save ricardolsmendes/dd4df817cce582fd59c5b533acf88039 to your computer and use it in GitHub Desktop.
Helpful shell commands to store a private key into an environment variable
# Get the private key from a JSON file using `jq`
# and store it into the `PRIVATE_KEY` environment variable:
export PRIVATE_KEY=$(jq -r '.private_key' service-account.json)
# Print a suitable value for GitHub secrets:
echo $PRIVATE_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment