We would like to use mercurial for web development, but we cannot (and do not want) install mercurial on a shared host. We are trying to use wget, as mentioned here , but I get error 401. The credentials and link are correct (changed for security).
Is there a way to load the source from the command line?
Is this a mistake or am I doing something wrong?
The answer is below:
$ wget _http://xxxx:yyyyyyy@bitbucket.org/username/repo/get/be51983f6357.zip
--2011-10-31 00:26:50--
http://username:password@bitbucket.org/username/repo/get/be51983f6357.zip
Resolving bitbucket.org... 207.223.240.182, 207.223.240.181
Connecting to bitbucket.org|207.223.240.182|:80... connected.
HTTP request sent, awaiting response...
301 Moved Permanently Location: https://bitbucket.org/username/repo/get/be51983f6357.zip [following]
--2011-10-31 00:26:51--
https://bitbucket.org/username/repo/get/get/be51983f6357.zip
Connecting to bitbucket.org|207.223.240.182|:443... connected.
HTTP request sent, awaiting response...
401 UNAUTHORIZED Authorization failed.
Take 2:
Thanx for reference ... I changed http to https and user attributes of user and password:
The browser works fine, Wget doesn't ...
$ wget --verbose --user=XXXXX --password=YYYY https://bitbucket.org/ekku/REPO/get/aabbccddeee.zip
--2011-10-31 18:27:10-- https://bitbucket.org/ekku/REPO/get/aabbccddeee.zip
Resolving bitbucket.org... 207.223.240.182, 207.223.240.181
Connecting to bitbucket.org|207.223.240.182|:443... connected.
HTTP request sent, awaiting response... 401 UNAUTHORIZED
Failed writing HTTP request: Bad file descriptor.
Retrying.
Take 3:
I also tried to curl, but I get an error message: Forbidden (403) Failed to perform CSRF check. Request aborted.