gpt4 book ai didi

mercurial - 来自 Bitbucket (mercurial) 的 Wget 压缩提示

转载 作者:行者123 更新时间:2023-12-02 12:37:59 25 4
gpt4 key购买 nike

我们希望使用 Mercurial 进行 Web 开发,但我们无法(也不想)在共享主机上安装 Mercurial。我们尝试使用提到的 wget here ,但我收到 401 错误。凭据和链接正确(出于安全原因进行了修改)。

有没有办法从命令行下载源代码?

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

回复如下:

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

取2:

感谢帮助...我将 http 更改为 https 以及用户用户和密码属性:

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

$ 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验证失败。请求已中止。

最佳答案

我用curl 让它工作:

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

Bitbucket的回答:Issue #3225 - Commanline download compressed tip

Hi Esa, We don't actually support basic auth for downloads of source bundles. You need to use digest auth. Also, from what I understand, wget has a bug with its digest auth implementation. You can use curl with the --digest flag and the -o flag to specify your output file. Cheers, Dylan

关于mercurial - 来自 Bitbucket (mercurial) 的 Wget 压缩提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7955290/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com