memo

2011-02-23

wget で HTTPS な URL にアクセスできないのをどうにかする

$ wget -S -O /dev/null https://github.com/nakamuray
wget: Unknown command `ca-cartificate' in /etc/wgetrc at line 127.
--2011-02-23 17:59:46--  https://github.com/nakamuray
Resolving github.com... 207.97.227.239
Connecting to github.com|207.97.227.239|:443... connected.
ERROR: cannot verify github.com's certificate, issued by `/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287':
  Self-signed certificate encountered.
To connect to github.com insecurely, use `--no-check-certificate'.

というように、証明書関係のエラーでアクセスできない。

/etc/wgetrc に:

ca-certificate = /etc/ssl/certs/ca-certificates.crt

を追加。