【发布时间】:2013-01-30 02:12:05
【问题描述】:
我想使用 wget 通过此 URL 远程下载文件:
https://test.mydomain.com/files/myfile.zip
站点 test.mydomain.com 需要登录。我想使用此命令在我的另一台服务器上下载该文件,但它不起作用(不完全下载文件):
wget --user=myusername --password=mypassword https://test.mydomain.com/files/myfile.zip
如果我的用户名是 myusername,密码是 mypassword,那么正确的 wget 语法是什么?
以下是我输入上述命令后的返回信息:
Resolving test.mydomain.com (test.mydomain.com)... 123.456.789
Connecting to test.mydomain.com (test.mydomain.com)|123.456.789|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://test.mydomain.com/login/unauthorized [following]
--2013-01-30 02:01:32-- https://test.mydomain.com/login/unauthorized
Reusing existing connection to test.mydomain.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://test.mydomain.com/login [following]
--2013-01-30 02:01:32-- https://test.mydomain.com/login
Reusing existing connection to test.mydomain.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `myfile.zip'
我错过了什么吗?请帮忙。谢谢。
【问题讨论】:
-
刚用谷歌快速搜索,发现this link. 看来你需要添加参数
--secure-protocol=protocol,协议为'auto'、'SSLv2'、'SSLv3'或'TLSv1' . -
试试这个插件,addons.mozilla.org/en-US/firefox/addon/cliget,它将帮助你获得正确的 wget 命令。
-
@Rodrigo 它还在 Wayback Machine 上 - 试试 web.archive.org/web/20170818004821/https://stackoverflow.com/…
-
@AJM-Reinstate-Monica 谢谢!
标签: wget