get-lit.ps1 failing happening again
Lautenschlager-id opened this issue · 6 comments
I've received lots of reports, Sinister had the same problem before (#234)
It mentions it's not possible to convert "Tls12" for the type "System.Net.SecurityProtocolType". Line 1, char 20. (No screenshots because it's in portuguese :P )
Can't reproduce on my machine (Windows 7). What OS are you running, and what command are you executing?
Four people and I tried, and both of them were using Windows 7 (x86 and x64). We all could reproduce it.
Using the command in the luvit website
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'))"
Second error is due to "exception calling DownloadString with 1 argument, the connection was closed, unexpected error"
Let me know if this works for you:
PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/master/get-lit.ps1'))"
If not, try this as well:
PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls11 -bor [System.Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/master/get-lit.ps1'))"
EDIT: Also, just for more information, run this and let me know what version of Powershell you're running:
powershell -command "(Get-Variable PSVersionTable -ValueOnly).PSVersion"
First one does not. Sent 2 erros:
Cannot convert null to System.Net.SecurityProtocolType due to wrong enumeration values
and
exception calling DownloadString with 1 argument, the connection was closed, unexpected error
Second one does not, too. Sent 1 error:
exception calling DownloadString with 1 argument, the connection was closed, unexpected error
For the last command,
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
Powershell 2.0 is pretty old and as far as I can tell it uses .NET Framework 3.5 which does not support the required TLS 1.2.
Try upgrading to at least Powershell 3.0: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-6#upgrading-existing-windows-powershell
Oh! That worked indeed. Thank you
Could you, or whoever manages luvit.io, meniton that ps3.0+ is needed? That would save so much time haha.
Thank you!