github page被墙了,博客更新不能,想到用goagent给git做代理:
$ export https_proxy="http://127.0.0.1:8087"
但是github的CA证书没有加进系统,于是可耻地出错了:
$ make github pelican /home/mdjhny/mdjhny.github.com/content -o /home/mdjhny/mdjhny.github.com/output -s /home/mdjhny/mdjhny.github.com/publishconf.py ghp-import /home/mdjhny/mdjhny.github.com/output git push -f origin gh-pages:master error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://github.com/mdjhny/mdjhny.github.com.git/info/refs fatal: HTTP request failed make: *** [github] 错误 128
可喜的是,强大的goagent已经提供了签过名的证书,我们将它们导入系统即可:
$ sudo mkdir /usr/share/ca-certificates/github.com/ $ cd !!:1 $ sudo cp /path/to/goagent/github.com.crt . $ sudo dpkg-reconfigure ca-certificates $ sudo update-ca-certificates
导入证书图示,按空格选中github.com这一行,enter
再push,没有任何错误,job is done.
FROM http://mdjhny.github.io/git-proxy-using-goagent.html