我正在使用document (在完整设置部分-步骤2)中提供的CMD(以管理员身份)运行以下命令,
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
但在异常情况下,
Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
At line:1 char:1
在做了一些谷歌搜索后,我发现我需要将安全协议更改为Tls1.2,因此尝试在添加TLS1.2协议后使用Windows PowerShell(以管理员身份)触发相同的命令。
添加Tls1.2的第一个命令,
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
我在CMD上运行的第二个相同的命令,
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
但是通过使用PowerShell,我得到了下面的结果:
如果你能帮我解决这个问题,我将不胜感激。
发布于 2021-01-03 08:35:42
在Powershell中设置SecurityProtocolType之后,只需在Powershell中执行以下命令:
iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))
https://stackoverflow.com/questions/64948113
复制相似问题