How to use HTTP Basic authentication with cURL
To access sites that use HTTP Basic authentication with curl, use command
curl -u USERNAME_HERE:PASSWORD_HERE http://domain.extn
Or
curl -u USERNAME_HERE http://domain.extn
If you don’t specify password, curl will promt for password.
See curl