Skip to content

Instantly share code, notes, and snippets.

@mhou1981
Created April 24, 2018 17:23
Show Gist options
  • Save mhou1981/93c0b70c55c862c391897785cbe2ea27 to your computer and use it in GitHub Desktop.
Save mhou1981/93c0b70c55c862c391897785cbe2ea27 to your computer and use it in GitHub Desktop.
Encode HTTP Basic Auth Credential
username='Test'
password='123'
credentials="$(echo -n "${username}:${password}" | base64)"
echo "Authorization: Basic ${credentials}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment