luvit / lit

Toolkit for developing, sharing, and running luvit/lua programs and libraries.
http://lit.luvit.io/
Apache License 2.0
245 stars 58 forks source link

Cannot fetch get-lit.ps1 #234

Closed SinisterRectus closed 6 years ago

SinisterRectus commented 6 years ago

Been receiving a lot of reports about this, and I've now been able to reproduce it myself.

Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://github.com/lu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
SinisterRectus commented 6 years ago

I've created a get-lit app at https://github.com/SinisterRectus/get-lit. I may expand it further to allow for other OSes and dynamic version handling.

squeek502 commented 6 years ago

Looks like this is the issue: https://stackoverflow.com/questions/41618766/powershell-invoke-webrequest-fails-with-ssl-tls-secure-channel

By default powershell uses TLS 1.0 the site security requires TLS 1.2

This works for me:

PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol =  'Tls12'; iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/master/get-lit.ps1'))"
SinisterRectus commented 6 years ago

Well that's interesting. I'll PR the change to luvit.io.