(my comment) This example doesn't work for me

1.) &lt;user> should be either <user> or <user:password>
2.) http://localhost:4984/ will probably redirect you to https:// but the command is not following redirects and it's not generic enough as it uses <localhost>
3.) using -k can be explained for the whole test - here's not used because for you use http and localhost

This works for me

    curl -k -u <user:password> -H 'Content-type: text/xml' https://<hostname>:4984/registration.xml