Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have a file on the server that is HTTP Head password protected, but when I tried to get the page the command returned with nothing at all:
curl --user username:password http://mysite.com
curl -v --user ...
The exit status (in shell variable $?) will tell you what failed. There is a table of meanings in the manual page. For interactive use, -v is more convenient.