征募http://www.foundweekends.org/conscript/setup.html中的此问题
当我尝试通过运行官方脚本(setup.ps1 script source code)在Windows 10上安装应征者时,遇到了同一个问题:
:::: ERRORS
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://dl.bintray.com/foundweekends/maven-releases/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.pom
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://dl.bintray.com/foundweekends/maven-releases/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.jar
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://oss.sonatype.org/content/repositories/releases/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.pom
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://oss.sonatype.org/content/repositories/releases/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.jar
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://repo1.maven.org/maven2/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.pom
Server access Error: java.security.NoSuchAlgorithmException: Default SSLContext not available url=https://repo1.maven.org/maven2/org/foundweekends/conscript/conscript_2.11/0.5.0/conscript_2.11-0.5.0.jar
我认为问题来自:
$wc = New-Object System.Net.WebClient
...
$wc.DownloadFile($url, "$CS/$LJ")
这里有wc对象,但是它们没有为下载对象组装SSLContext。
您能举个例子如何给$ wc默认SSLContext并使其下载https链接吗?
最佳答案
尝试将其放在脚本的顶部
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
关于powershell - 如何在Powershell中为简单的https下载设置默认的Default SSLContext?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38733742/