Skip to content

TLS error in Get-GitHubIssueForRepository : Failed to execute query with exception #33

@erichexter

Description

@erichexter

It looks like there is a issue with TLS with the latest version published to the PSGallery.

When running

$issues=Get-GitHubIssueForRepository -repositor
yUrl @('https://github.com/QuarterSpot/../')
Getting issues for repository https://github.com/QuarterSpot/.../

I get the following error:

Get-GitHubIssueForRepository : Failed to execute query with exception: System.Net.WebException: The request was
aborted: Could not create SSL/TLS secure channel.
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
HTTP status code:
At line:1 char:9
+ $issues=Get-GitHubIssueForRepository -repositoryUrl @('https://github ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GitHubIssueForRepository

I found a workaround which is to set the default security protocol. I just executed this in the same session that the module was imported.

[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.SecurityProtocolType]::Tls12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions