Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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/
$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
You can’t perform that action at this time.