-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Peer certificate cannot be authenticated with given CA certificates #9
Comments
@mmistakes Thanks for the detailed bug report. I believe We could provide an option to disable SSL verification, but ideally we'd get cURL to authenticate. Have you tried setting |
@benbalter Thanks for the quick reply. I've tried setting both of those environment variables but still get similar results. I can't tell if the certificates are the problem or if it's something else. Using the instructions on cURL's site I downloaded cacert.pem and set that location in my variables. About the only difference it makes is spitting out errors like this a ton:
Feels like the certificate might be the problem but to my eye it seems valid. |
Digging deeper I tried using just cURL and it pulled down the .zip no problem.
Seems like libcurl in my Ruby environment might be the issue. So going to investigate further there. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@mmistakes were you able to resolve this issue? I am running in the the same error jekyll 3.6.2 | Error: Peer certificate cannot be authenticated with given CA certificates trying to run bundle exec jekyll serve on my Windows 10 os. |
@caityp Nope, never solved it. At one point when the remote theme gem was first released it worked for me on Windows. Then I made the mistake of updating my Ruby environment to 2.4 and never got it to work again. RubyInstaller changed the development kit to MSYS2 so I have no idea if that's to blame or what. I even tried reinstalling older 2.3 versions to no avail. I eventually gave up as Windows isn't my primary device... I only use it for testing some themes I develop so it's more of a nuisance than a deal breaking. |
@caityp I had the same problem with remote-theme and never solved it. I ended up switching to the gem version of the minimal mistakes theme (if that's what you're using you might be able to do the same) and now I host on Netlify. |
@mmistakes and @jengalas, Good to know! I am using the github pages version of the so simple theme in Ruby 2.4, so maybe i'll try switching to the gem and check out Netlify. Thanks for the ideas. |
@mmistakes @benbalter @jengalas @caityp I found a build of libcurl for windows which is built with WinSSL. This uses the windows CA certificate store, so all one has to do is install the bundle into the windows cert store and libcurl/jekyll-remote-theme will happily connect to github over https. Hope that helps. |
Looks like I'm going down the same path and have the same issue on Windows 10. I originally had the "couldn't find libcurl.dll" (#18) and found a libcurl.dll from another solution/site (which I'm super uncomfortable with). But I'm now hitting this issue Certification issue and not getting anywhere. I tried the same curl download from above and it also worked for me. |
Version 0.3.0 uses Ruby's native Net:HTTP, instead of Typhoeus (Libcurl), which may alleviate this issue. |
I switched to using Windows Subsystem for Linux (WSL) for my Jeykll work and all good. Using just git bash and the Ruby environment seems to be the challenge, and adding lots to it - msys2, curl, and so on, did not seem to solve the entire set of challenges. Moving on... :-) |
@benbalter using version 0.3.0 of jekyll-remote-theme did resolve the issue for me! |
Working for me as well now. Thanks for the note @caityp. Wish that had been released a few days ago - cost me some time :-), but all good now. Good to have the Windows Subsystem for Linux fallback. Thinking of redoing my machine to have all code related things based on WSL instead of the combination I have now. Would probably be more consistent. |
I'm going to go ahead and assume this is an upstream issue with cURL or libcurl on Windows, but figured I'd flag this here in case it's not.
I ran into this doing a test build on a Windows 7 64bit box.
Steps to reproduce on Windows.
bundle install
bundle exec jekyll build
Here's the verbose output:
From the looks of it its a CA certificate issue. I've tried everything I could find related to libcurl and SSL certs and none of them seemed to work.
Refs: http://blog.cloud-mes.com/2014/08/19/how-to-install-gem-curb-in-windows/, taf2/curb#37, taf2/curb#183
I've notice similar issues with Typhoeus/libcurl when trying to get html-proofer up and running. That gem seems to be unaffected by this so not entirely sure what the issue is, other than Windows being notoriously hard to get libcurl installed properly.
The text was updated successfully, but these errors were encountered: