Standard login to the site with authorization is as follows:
curl -u username:password site.ru
If you substitute a password
123:'"456
to the command, then bash is looking for the closing of a single quote, and curl may be acting out of the box because of a colon.