githubでwgetできなかったからcurl使った

[server@user]$ wget https://github.com/a9b/hoge/zipball/master

とやってみたらSSL関係のエラーが出たので調べてみると
githubの仕様がちょこちょこ変わっている模様です。

参考URL

http://d.hatena.ne.jp/tmatsuu/20110614/1308010044


wgetの最新版を入れるという選択肢もあるが、面倒なので
cURLで済むならcURLで済ます。

[server@user]$ curl -L -o hoge.zip https://github.com/a9b/hoge/zipball/master

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
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). The default
bundle is named curl-ca-bundle.crt; 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.

中間証明がおかしいようなので、警告を無視してみる。

[server@user]$ curl -L -o hoge.zip https://github.com/a9b/hoge/zipball/master --insecure

無事取得できました。