dfinke / InstallModuleFromGitHub

Install PowerShell Modules from GitHub
Apache License 2.0
87 stars 31 forks source link

Add support to private repositories #11

Open junalmeida opened 5 years ago

junalmeida commented 5 years ago

Instead of asking me my login and password, this module is failing when trying to access a private github repository:

A solicitação foi anulada: Não foi possível criar um canal seguro para SSL/TLS.
No C:\Program Files\WindowsPowerShell\Modules\InstallModuleFromGitHub\1.2\InstallModuleFromGitHub.psm1:40 caractere:19
+                   Invoke-RestMethod $url -OutFile $OutFile
+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
mivalsten commented 5 years ago

Hi @junalmeida, I've created pull request #13 that solve both your issues. The error you pasted is standard powershell error with SSL, you may fix it by running following command first: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12