Bash Docker:https的wget不起作用

Bash Docker:https的wget不起作用,bash,shell,https,docker,wget,Bash,Shell,Https,Docker,Wget,在我的docker文件中,我有以下命令 RUN wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar 但在构建中,我得到以下错误: The command '/bin/sh -c wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-pl

在我的docker文件中,我有以下命令

RUN wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
但在构建中,我得到以下错误:

The command '/bin/sh -c wget -o test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar' returned a non-zero code: 8
我尝试了
--no check certificate
-U
,但得到了相同的错误。

说明
-o
指定日志消息写入的位置。这意味着选项
-o test.jar
导致将错误消息写入
test.jar
而不是stderr。您不会在stderr上看到任何错误消息,也不会将文件下载到
test.jar

以下命令适用于我的电脑,如果出现任何错误,您现在应该会看到一条消息:

wget -O test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar
说明
-o
指定日志消息写入的位置。这意味着选项
-o test.jar
导致将错误消息写入
test.jar
而不是stderr。您不会在stderr上看到任何错误消息,也不会将文件下载到
test.jar

以下命令适用于我的电脑,如果出现任何错误,您现在应该会看到一条消息:

wget -O test.jar https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar

下面的命令起作用。我应该用ADD

ADD https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar .

下面的命令起作用。我应该用ADD

ADD https://bintray.com/artifact/download/thesamet/maven/gerrit-saml-plugin-2.11.4-2.jar .

有时这是一个代理问题

我们通过以下方式解决了代理问题:


wget--no check certificate-e use_proxy=yes-e http_proxy=YOURPROXYhttp://... ...

有时这是一个代理问题

我们通过以下方式解决了代理问题:


wget--no check certificate-e use_proxy=yes-e http_proxy=YOURPROXYhttp://... ...

wget
是否没有生成错误消息?URL中是否有空格?没有错误,并且URL中是否没有由
wget
生成的错误消息?URL中有空格吗?没有错误,URL是我收到
HTTP请求,正在等待响应。。。403禁止2015-12-07 04:00:37错误403:禁止。
@Sara这意味着服务器表示您无法访问请求的路径。也许你的脚本有错?我复制了同一行,然后运行了它successful@Sara
wget
进一步说明了什么?由
wget
写入的URL是否正确?它表示
20个重定向已超出。
因为它尝试相同的命令20次,我收到
HTTP请求,等待响应。。。403禁止2015-12-07 04:00:37错误403:禁止。
@Sara这意味着服务器表示您无法访问请求的路径。也许你的脚本有错?我复制了同一行,然后运行了它successful@Sara
wget
进一步说明了什么?由
wget
写入的URL是否正确?它表示超过了
20个重定向。
因为它尝试了20次相同的命令