Skip to content

Instantly share code, notes, and snippets.

@mikequentel
Created October 1, 2020 12:59
Show Gist options
  • Save mikequentel/b2d5ba8c1065464a5b6b2a2073c548a8 to your computer and use it in GitHub Desktop.
Save mikequentel/b2d5ba8c1065464a5b6b2a2073c548a8 to your computer and use it in GitHub Desktop.
bash script to set credentials as environment variables
if [ -z "${MY_USERNAME}" ]; then
echo -n "Enter MY_USERNAME: "
read -r MY_USERNAME
echo
fi
if [ -z "${MY_PASSWORD}" ]; then
echo -n "Enter MY_PASSWORD: "
read -r -s MY_PASSWORD
echo
fi
export MY_USERNAME
export MY_PASSWORD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment