I\'m try to do this request on php, for download the last source from my Bitbucket private repository:
curl --digest --user user:pass https://bitbucket.org/u
I had a same problem; removed all the non-alphanumeric characters from the password and it worked! Don't know why though.
I hope it helps.