Subject: | documentation for use of curl -O does not work as suggested. |
curl -O http://xrl.us/cpanm
xxd ./cpanm
0000000: 3c21 444f 4354 5950 4520 4854 4d4c 2050 <!DOCTYPE HTML P
0000010: 5542 4c49 4320 222d 2f2f 4945 5446 2f2f UBLIC "-//IETF//
0000020: 4454 4420 4854 4d4c 2032 2e30 2f2f 454e DTD HTML 2.0//EN
0000030: 223e 0a3c 4854 4d4c 3e3c 4845 4144 3e3c ">.<HTML><HEAD><
0000040: 5449 544c 453e 5265 6469 7265 6374 2e2e TITLE>Redirect..
0000050: 2e3c 2f54 4954 4c45 3e3c 2f48 4541 443e .</TITLE></HEAD>
0000060: 3c42 4f44 593e 5468 6520 646f 6375 6d65 <BODY>The docume
0000070: 6e74 2068 6173 206d 6f76 6564 203c 4120 nt has moved <A
0000080: 4852 4546 3d22 6874 7470 3a2f 2f67 6974 HREF="http://git
0000090: 6875 622e 636f 6d2f 6d69 7961 6761 7761 hub.com/miyagawa
00000a0: 2f63 7061 6e6d 696e 7573 2f72 6177 2f6d /cpanminus/raw/m
00000b0: 6173 7465 722f 6370 616e 6d22 3e68 6572 aster/cpanm">her
00000c0: 653c 2f41 3e2e 3c50 3e3c 2f42 4f44 593e e</A>.<P></BODY>
00000d0: 3c2f 4854 4d4c 3e0a </HTML>.
You need -L to follow location hints, however, that still has the same issue as mentioned in the changelog:
curl -L -O http://xrl.us/cpanm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 214 0 --:--:-- --:--:-- --:--:-- 214
curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
So you really need:
curl -L -k -O http://xrl.us/cpanm