Hey! curl basic auth is pretty simple once you know the tricks. The `-u` flag is the standard way, but if it’s not working, try encoding the credentials manually:
`echo -n 'username:password' | base64`
Then use that in the header:
`curl -H "Authorization: Basic <encoded_creds>" https://api.example.com`
And yeah, plain text creds are a bad idea. Use a .netrc file or environment variables to keep ‘em safe.
`echo -n 'username:password' | base64`
Then use that in the header:
`curl -H "Authorization: Basic <encoded_creds>" https://api.example.com`
And yeah, plain text creds are a bad idea. Use a .netrc file or environment variables to keep ‘em safe.
