SSL connection could not be established - install/update workaround #6308
Unanswered
luxzg
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I've encountered an issue with PowerShell and some HTTPS sites, in this case https://windows.php.net
Issue details:
The SSL connection could not be established, see inner exception. URL https://windows.php.net/downloads/releases/php-8.4.5-Win32-vs17-x64.zip is not valid
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. URL https://windows.php.net/downloads/releases/php-8.3.19-Win32-vs16-x64.zip is not valid
schannel: disabled automatic use of client certificate
&schannel: failed to receive handshake, SSL/TLS connection failed
Invoke-WebRequest
returns error :Invoke-WebRequest: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
... and so on ...
While not an issue with scoop, relying on PowerShell makes it an issue anyway.
Note that at the same time updating 30+ apps with scoop went just fine, it's just some websites that have this issue.
I found similar issues on github for scoop install failures, such as:
The handshake failed due to an unexpected packet format.
Extras#14660Proposed workarounds sometimes revolve around variations on:
[Net.ServicePointManager]::SecurityProtocol = "tls, tls11, tls12, tls13, SystemDefault"
I tried variations like:
[Net.ServicePointManager]::SecurityProtocol = "tls13, tls12, tls11"
... and so on.. nothing helped
Note this is per-session setting, so even if you change it, close PS window, and reopen new one, running
[System.Net.ServicePointManager]::SecurityProtocol
will confirm your settings were reset. So answers where they had success after reboot don't make sense either,Also, enabling or disabling aria in scoop didn't help either way.
Anyway, long story short, I did NOT resolve the downloading issue, so if anyone has other workarounds please chime in.
But I DID make another workaround, though slightly silly as scoop was meant to automate things, but anyway...
C:\scoop\cache
https://windows.php.net/downloads/releases/php-8.4.5-Win32-vs17-x64.zip
php#8.4.5#https_windows.php.net_downloads_releases_php-8.4.5-Win32-vs17-x64.zip
scoop install main/php
'php' (8.4.5) was installed successfully!
Same should work in case your update fails, download and place new file to cache then try to update again.
Now, my GUESS is based on curl error, that php.net requires client certificate and PowerShell isn't providing any, or is providing wrong file. I have no idea how to solve that. Invoke-Webrequest can serve certificate but I didn't bother as I still wouldn't be able to make scoop do the same.
Anyway, there's my workaround for similar issues, if someone knows how to solve underlying issue, I'd be happy to have something more... permanent... ;-)
Beta Was this translation helpful? Give feedback.
All reactions