I am trying to download the latest release of a web application from GitHub using wget
on the shell. As far as I remember, I never had any trouble with wget. I issue the following command:
wget 'https://github.com/kitodo/kitodo-production/releases/download/goobi-ce-1.11.2/goobi-ce-
1.11.2.war'
I expected this to save the file goobi-ce-1.11.2.war
in the current directory. Instead, no file is written, and I get a lot of shell output:
--2016-11-10 09:14:51-- https://github.com/kitodo/kitodo-production/releases/download/goob
i-ce-1.11.2/goobi-ce-1.11.2.war
Resolving github.com... 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/4506938/1c6c2686-ec1f-11e5-9767-4f
19a4d8f219.war?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F201
61110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161110T081451Z&X-Amz-Expires=300&X-Amz-S
ignature=8dddd783418dcaada6338d3c645d4208a2215239272d7998259af9fcac6f109e&X-Amz-SignedHeade
rs=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dgoobi-ce-1.11.2.
war&response-content-type=application%2Foctet-stream [following]
--2016-11-10 09:14:51-- https://github-cloud.s3.amazonaws.com/releases/4506938/1c6c2686-ec
1f-11e5-9767-4f19a4d8f219.war?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFO
VBIJMK3TQ%2F20161110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161110T081451Z&X-Amz-Expi
res=300&X-Amz-Signature=8dddd783418dcaada6338d3c645d4208a2215239272d7998259af9fcac6f109e&X-
Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dg
oobi-ce-1.11.2.war&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com... 52.216.2.0
Connecting to github-cloud.s3.amazonaws.com|52.216.2.0|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 64309224 (61M) [application/octet-stream]
1c6c2686-ec1f-11e5-9767-4f19a4d8f219.war?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=
AKIAISTNZFOVBIJMK3TQ%2F20161110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161110T081451Z
&X-Amz-Expires=300&X-Amz-Signature=8dddd783418dcaada6338d3c645d4208a2215239272d7998259af9fc
ac6f109e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment; filen
ame=goobi-ce-1.11.2.war&response-content-type=application%2Foctet-stream: File name too lon
g
Cannot write to `1c6c2686-ec1f-11e5-9767-4f19a4d8f219.war?X-Amz-Algorithm=AWS4-HMAC-SHA256&
X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date
=20161110T081451Z&X-Amz-Expires=300&X-Amz-Signature=8dddd783418dcaada6338d3c645d4208a221523
9272d7998259af9fcac6f109e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=
attachment; filename=goobi-ce-1.11.2.war&response-content-type=application%2Foctet-stream'
(Success).
It seems to be a problem with the redirect, and that wget
tries to write a file named 1c6c2686-ec1f-11e5-9767-4f19a4d8f219.war?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161110T081451Z&X-Amz-Expires=300&X-Amz-Signature=8dddd783418dcaada6338d3c645d4208a2215239272d7998259af9fcac6f109e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment; filename=goobi-ce-1.11.2.war&response-content-type=application%2Foctet-stream
which obviously is a problem.
I tried this:
wget 'https://github.com/kitodo/kitodo-production/releases/download/goobi-ce-1.11.2/goobi-ce-
1.11.2.war' > goobi-ce-1.11.2.war
It creates the file, but the file is 0 bytes (with the same screen output). This one does not work either:
wget -O goobi-ce-1.11.2.war 'https://github.com/kitodo/kitodo-production/releases/download/go
obi-ce-1.11.2/goobi-ce-1.11.2.war'
It outputs the screen messages to the file (about 2k, where the binary would be 61M).
Is it possible to download the file using wget?
0 Answers