Appveyor cannot download packer from hashicorp

Juanjo's Avatar


26 Jul, 2023 09:24 AM

I am unable to download packer package from hashicorp official download.
We get this error "Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel." when we run the commands using powershell defined in our appveyor.yaml file.
First it failed using "choco install packer", all versions of packer fail, not just the last one, seems a problem with the certificate.
We have tried to use all the solutions found around in order to force Tls1.2 or Tls1.3 using registry keys or commands like [Net.ServicePointManager]::SecurityProtocol = 'Ssl3, Tls, Tls11, Tls12' and similars, but none of them seem to be working.

We have tried to install curl or wget (choco install curl, choco install wget) but we get exactly the same problem as they seem that they probably are just aliases of "Invoke-WebRequest".

A workaround, hacky but working, has been uploading the package to one of our web servers and download it from there, as we NEED to use https and we cannot use http for our requests, then I unzip the file directly in the choco cache folder, this way I can use packer, but this is just a hacky workaround using our resources but not a solution we can have in production code.

What shoud we do in order to make "choco install packer" work? Everything tried and failed, I think something needs to be done from appveyor side in order to tweak their boxes to enable the TLS/SSL channel, we even tried to do an import of Amazon Root CA1 certificate, but it made no change.

  1. Support Staff 1 Posted by Owen McDonnell on 26 Jul, 2023 05:28 PM

    Owen McDonnell's Avatar

    Are you able to share your config file? You can make this private if you wish.

  2. Support Staff 2 Posted by Owen McDonnell on 26 Jul, 2023 11:26 PM

    Owen McDonnell's Avatar

    If you are currently using VS 2015 image on the project in question, can you try running a build on Visual Studio 2019 image and let us know if that works?

  3. Feodor Fitsner closed this discussion on 26 Sep, 2023 09:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac