我试图在我的 Windows 10 系统上使用 poole 和 jekyll 构建一个静态站点。
当我运行命令 jekyll serve
时,出现以下错误:
Liquid Exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed in some_path/_posts/2016-01-02-example-content.md
jekyll 3.5.0 | Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert access denied
我已经尝试使用 cacert.pem 修复程序,但没有用。 您能否提出任何其他替代方案或我可能忽略的事情......?
最佳答案
这是由于 SSL 证书身份验证错误。
尝试下载 GlobalSignRootCA.pem文件并将其放在以下路径中:
<Ruby installation directory>/lib/ruby/<version>/rubygems/ssl_certs
但是,请注意在 Windows 上使用 Jekyll 不受 Jekyll 团队的正式支持。因此,您可能会继续在系统上执行 jekyll serve
时遇到错误。
此问题的解决方法是将 Ruby 降级到 2.0.0 版,将 Jekyll 降级到 2.4.0 版(已测试),然后使用 GlobalSignRootCA.pem如上所述修复证书以构建您的网站。
这在 this blog 中有很好的介绍.
请记住,这并不能保证将来构建 100% 无错误,因为降级会终止对许多常用 gem 的支持。
希望这对您有所帮助!
关于ruby - Liquid Exception - Jekyll 发球,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44715915/