OneGetGitHubProvider
OneGetGitHubProvider copied to clipboard
Additional Info for Wiki - Setting TLS to version 1.2 via PowerShell on Windows Server 2016
Overview
Great work on this provider! Just wanted to make a note of something I've seen in case it helps others. I wouldn't call it bug though. After initial installation I get an SSL/TLS error when searching for github repositories using this provider. Setting my TLS version to 1.2 in PowerShell solved this.
Details
Installed provider using steps from README:
Install-PackageProvider GitHubProvider`
Import-PackageProvider GitHub
Initially, when searching for GitHub repositories I get this error:
Find-Package -ProviderName GitHub -Source "Microsoft"
WARNING: The request was aborted: Could not create SSL/TLS secure channel.
This would happen on any source I searched on. I've seen this error in the past when connecting to endpoint like DSC pull servers and the solution was the same.
I checked the security protocols being used via this command and verified the it was allowing SSL:
[Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls
I then changed it to only allow TLS 1.2:
[Net.ServicePointManager]::SecurityProtocol = [Net.Securityprotocoltype]::Tls12
Now it works:
Find-Package -ProviderName GitHub -Source "Microsoft"
Name Version Source Summary
---- ------- ------ -------
2LCS 1.0 GitHub/Microsoft Lifecycle Services Companion App for administrators
3-in-1-dock 1.0 GitHub/Microsoft
AADConnectConfigDocumenter 1.0 GitHub/Microsoft AAD Connect configuration
etc...
It's possible this won't affect every system as newer Windows 10 builds may have this enabled by default. The system I was running on was Windows Server 2016, Datacenter Server Edition, Build 10.0.14393 AND in a docker container.
Would be interested to see if this shows up on other operating systems.
Thanks! Great coincidence too. I was doing some things with PS + GitHub and ran into the same error. You posting this issue and solution resolved mine.