Closed mil1i closed 4 years ago
Have you tried explicitly setting tls 1.2? See: https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/
Sorry I forgot to update this.
I was able to resolve with something similar to the above.
Little annoying that they only provided a temporary workaround in their post. At least someone in the comments lead us in the correct direction.
This is during a packer build for me. So my solution ended up being creating my first powershell provisioner to and starting a new powershell session:
# Set strong cryptography on 32 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\.NetFramework\\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
# Set strong cryptography on 64 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\.NetFramework\\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Temporary method was:
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'
Yea I agree...
i have the same problem with powershell on linux and "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls12'" didn't work , any idea ?
Has something happened where the NuGet package provider is missing now?
This is failing to install in pipelines, as well as locally for multiple people on my team (working from different locations).
Now from the examples below, you'll see that I'm using PowerShell Core from a mac. Everyone else on my team is using Windows, including the build pipelines mentioned. Each yielding the same results.
This has been used in our packer builds for some time now, and haven't ran into any issues until today (4/6).
From MS Documentation:
Results: