mikaelkrief / GitHub-Tools-vsts-extensions

VSTS extension Build and Release Tasks for Github tools
3 stars 3 forks source link

Could not create SSL/TLS secure channel #7

Closed Sam-Lin-MillersLab closed 6 years ago

Sam-Lin-MillersLab commented 6 years ago

I follow your blog http://www.mikaelkrief.com/create-github-release-with-release-notes-in-vsts-pipeline/

but I got this error. Any idea? thanks!

C:\agent_work_tasks\GitHubRelease_1c3396d6-5af6-4ccc-8169-199ec6541d23\1.0.0\GitHubRelease.ps1 : The request was aborted: Could not create SSL/TLS secure channel.

Sam-Lin-MillersLab commented 6 years ago

I think it is because Github use TLS 1.2 now.

marcwittke commented 6 years ago

As workaround you can force the agent to use TLS 1.2 by adding some registry keys on your build agent:

# 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

# 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 

don't forget to restart the agent after applying those patches.

mikaelkrief commented 6 years ago

@Sam-Lin-MillersLab , @marcwittke I published a new version of the extension that contain a fix

mikaelkrief commented 6 years ago

fixed in #8 and #9