Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the App-cpanminus CPAN distribution.

Report information
The Basics
Id: 63997
Status: resolved
Priority: 0/
Queue: App-cpanminus

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.1006
Fixed in: (no value)



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


You'll also need that -k for use with the basic command line usage. People can probably work this out for themself,

    curl -L http://cpanmin.us | xxd
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0     15      0  0:00:12  0:00:11  0:00:01    15
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.


curl -L -k http://cpanmin.us | wc -c
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  167k  100  167k    0     0  45763      0  0:00:03  0:00:03 --:--:-- 72172
171017


curl -V
curl 7.21.2 (x86_64-pc-linux-gnu) libcurl/7.21.2 NSS/3.12.8.0 zlib/1.2.5 libidn/1.19
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Yes, the document has been updated to include -L.