swcarpentry / windows-installer

Software Carpentry installer for Windows.
MIT License
21 stars 17 forks source link

SSL certificate verification error on nano download #54

Open iamc opened 8 years ago

iamc commented 8 years ago

When running the installer, as it tries to download nano I get the error:

...
File "swc-windows-installer.py", line 72, in download
  r = _urlopen(url)
...
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)>

I can circumvent this bypassing the SSL verification step as described in http://stackoverflow.com/questions/36600583/python-3-urllib-ignore-ssl-certificate-verification, but I don't know if this is a proper solution. Any ideas?

wking commented 8 years ago

On Tue, Jun 14, 2016 at 04:30:43PM -0700, Iñigo Aldazabal wrote:

When running the installer, as it tries to download nano I get the error:

...
File "swc-windows-installer.py", line 72, in download
  r = _urlopen(url)
...
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)>

Are you sure that was for nano and not for SQLite? The latter will be fixed once #48 lands (ping @embray), and that was the only HTTPS endpoint I saw in the script.

embray commented 8 years ago

Per @wking this should be fixed by #48. Do I need to build a new installer exe? Where do we upload that to, github?

iamc commented 8 years ago

Are you sure that was for nano and not for SQLite?

Yes, even if it's really weird because of not being https, in the same (Windows VirtualBox virtualized) system, using python in the console I get the same result:

urlopen('http://www.nano-editor.org/dist/v2.2/NT/nano.2.2.6.zip')
...
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)>

In the linux hosting the virtual machines it works ok, so this could be related to being virtual machines.

I'll try later on a "real" windows machine and report back.

iamc commented 8 years ago

OK, the installer worked ok in a "real" windows 7 machine, but not in any of the VM I was using for testing, giving the SSL certification validation error in all of them.

So I guess this should be a VirtualBox related issue, and a strange one indeed as make gets downloaded and installed but nano raises this error when trying to be downloaded.

embray commented 8 years ago

Well right now nano-editor.org appears to be down entirely. Appears to be a DNS issue??

embray commented 8 years ago

Well it turns out nano-editor.org redirects all http requests to https, so that also makes the "fix" for #48 not useful--even though it's now downloading SQLite over HTTP there's no way to not download nano over HTTPS. Which frankly is a good thing.

Ultimately I don't think the installer should be downloading anything--all files should be bundled in the installer executable itself, and that would take care of this. See #56

c-martinez commented 7 years ago

Bumped into this issue during a workshop. It was not easy to figure out what the problem was. The only clue we had was: "I ran the installer, but I still don't have nano". In the end we found out the installer was actually giving an error, and that it had to do with SSL: CERTIFICATE_VERIFY_FAILED.

I agree that a bundled installer would be a good fix, but while that gets implemented, is it possible to have better error handling to make it easier to figure out what is the issue?