我們想使用mercurial進行web開發,但是我們不能(也不想)在共享主機上安裝mercurial。我們嘗試使用wget,如here所述,但我得到401錯誤。 憑據和鏈接是正確的(爲了安全性而修改)。Wget從Bitbucket壓縮的提示(mercurial)
有沒有辦法從命令行下載源代碼?
是這個錯誤還是我做錯了什麼?
迴應如下:
$ wget _http://xxxx:[email protected]/username/repo/get/be51983f6357.zip
--2011-10-31 00:26:50--
http://username:[email protected]/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:
thanx的幫助......我改變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:
我也嘗試捲曲,但我得到錯誤消息: 禁止(403) CSRF驗證失敗。請求中止。
嘗試直接點擊HTTPS網址。你正在訪問HTTP,並且wget最有可能不會通過重定向傳遞嵌入了url的憑據。 –
改爲使用'--user'和'--password'命令行選項。 –
我得到了它的捲曲工作: 捲曲--digest --user用戶名:密碼https://bitbucket.org/user/repo/get/tip.zip -o test.zip從到位桶 答:HTTPS ://bitbucket.org/site/master/issue/3225/commanline-download-compressed-tip Hi Esa, 我們實際上並不支持源碼包下載的基本身份驗證。 您需要使用摘要身份驗證。另外,據我所知,wget有一個摘要認證實現的bug。 可以使用curl和--digest標誌和-o標誌來指定輸出文件。 歡呼聲, Dylan – Esa