Created
March 26, 2018 00:17
-
-
Save iversond/772e73257c4ca59a9e6137baa7288788 to your computer and use it in GitHub Desktop.
Script to download the updated CA file to RubyGems on Windows will work. From the blog post: http://wragg.io/using-puppet-modules-forge-and-r10k/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$CACertFile = Join-Path -Path $ENV:AppData -ChildPath 'RubyCACert.pem' | |
If (-Not (Test-Path -Path $CACertFile)) { | |
"Downloading CA Cert bundle.." | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-WebRequest -Uri 'https://curl.haxx.se/ca/cacert.pem' -UseBasicParsing -OutFile $CACertFile | Out-Null | |
} | |
"Setting CA Certificate store set to $CACertFile.." | |
$ENV:SSL_CERT_FILE = $CACertFile | |
[System.Environment]::SetEnvironmentVariable('SSL_CERT_FILE',$CACertFile, [System.EnvironmentVariableTarget]::Machine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment