When running the bootstrapper powershell script in a fresh repository (without the tools folder), the scripts crashes with
Could not download packages.config.
At build.ps1:128 char:9
+ Throw "Could not download packages.config."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Could not download packages.config.:String) [], RuntimeException
+ FullyQualifiedErrorId : Could not download packages.config.
Did something change in the url that is used?
same issue for me, on a build previously working and unchanged:
30-Oct-2017 10:19:27 | At D:\BambooHome\xml-data\build-dir\35028993-35094529\build.ps1:131 char:9
30-Oct-2017 10:19:27 | +聽 聽 聽 聽 聽Throw "Could not download packages.config."
30-Oct-2017 10:19:27 | +聽 聽 聽 聽 聽~~~~~~~~~~~
30-Oct-2017 10:19:27 | + CategoryInfo聽 聽 聽 聽 聽 : OperationStopped: (Could not download packages.c
30-Oct-2017 10:19:27 | onfig.:String) [], RuntimeException
30-Oct-2017 10:19:27 | + FullyQualifiedErrorId : Could not download packages.config.
There is an issue with the SSL hosting provider now.
One of my colleagues discovered that it's because PS will use TLS 1.0 by default.
Executing [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 before running the build script fixes this.
The real fix should probably be to add this to the beginning of the build.ps1 file.
Just to add, @hravnx comment will fix build,
but currently if you will try to execute power shell command from Setting Up A New Project
Invoke-WebRequest https://cakebuild.net/download/bootstrapper/windows -OutFile build.ps1
It will fails as well,
so this page should be updated as well to mention command to enable Tls12
or better cakebuild.net Certificate should be updated to support default PS Security Protocols (Ssl3, Tls)
@overeemm @SIkebe @pants4robots @hravnx @makison we are currently working with our hosting provider to understand what is going on, and why. We will update this issue: https://github.com/cake-build/resources/issues/39 as more information is available. For now, I am closing to close this issue.
Most helpful comment
One of my colleagues discovered that it's because PS will use TLS 1.0 by default.
Executing
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12before running the build script fixes this.The real fix should probably be to add this to the beginning of the build.ps1 file.