本文介绍了来自Bitbucket的Wget压缩笔尖(Mercurial)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想使用Mercurial进行Web开发,但是我们不能(也不想)在共享主机上安装Mercurial.我们尝试在此处中使用wget ,但出现401错误.凭据和链接正确(为安全起见已修改).

We would like to use mercurial for web development, but we can't (and don't want to) install mercurial on a shared host. We try to use wget as mentioned here, but I get 401 error. Credentials and link are correct (modified for security).

是否可以从命令行下载源代码?

Is there a way to download source from command line?

是这个错误还是我做错了什么?

Is this bug or am i doing something wrong?

以下回复:

$ 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.

接二:

感谢您的帮助...我将http更改为https,用户名为&密码属性:

Take 2:

Thanx for help... i changed http to https and user user & password attributes:

浏览器工作正常,Wget不能...

Browser works fine, Wget does not...

$ 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.

接3 ::

我也尝试了curl,但收到错误消息: 禁止的(403) CSRF验证失败.请求已中止.

Take 3:

I also tried curl, but i get error message: Forbidden (403) CSRF verification failed. Request aborted.

推荐答案

我可以在curl上使用它:

I got it working with curl:

curl --digest --user username:password https://bitbucket.org/user/repo/get/tip.zip -o test.zip    

Bitbucket的答案:问题#3225-Commanline下载压缩后的提示

Answer from Bitbucket: Issue #3225 - Commanline download compressed tip

这篇关于来自Bitbucket的Wget压缩笔尖(Mercurial)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 05:00