Skip to content
This repository has been archived by the owner on Dec 25, 2019. It is now read-only.

gvm install grails results in an exception #27

Open
danleahy opened this issue Mar 13, 2018 · 2 comments
Open

gvm install grails results in an exception #27

danleahy opened this issue Mar 13, 2018 · 2 comments

Comments

@danleahy
Copy link

Hi,
your posh-gvm module to install grails is not working, tried now on 2 machines both Windows 10
Power shell version 5

same command to install groovy works fine
gvm install groovy works fine

Exception

PS C:\Users\Daniel\Documents\WindowsPowerShell\Modules> gvm install grails

Downloading: grails 3.3.3

Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At C:\Users\Daniel\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:468 char:5

  • $response = $request.GetResponse()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : WebException

PS C:\Users\Daniel\Documents\WindowsPowerShell\Modules> $PSVersionTable.PSVersion

Major Minor Build Revision


5 1 16299 251

@rdmueller
Copy link

I tried to debug the script a little bit.
It seems that gvm tries to download grails from http://api.sdkman.io/download/grails/3.3.3?platform=posh which is not an https url.

The URL works and changing it to https for gvm does not resolve the problem :-(

I found a german blog post which states that it might be a problem with the TLS versions supported by the server https://www.frankysweb.de/powershell-es-konnte-kein-geschuetzter-ssltls-kanal-erstellt-werden/ . It basically states that if you execute

$AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols

on you powershell before doing gvm install grails, it works. I gave it a try and it really works. But I don't know if it weakens your security!

another workaround is to manually download grails from the location above and put it in your c:/users/[userid]/.poshgvm/.meta/archives/ folder. gvm will then notice that it already has been downloaded and use it.

hope that helps

@kastork
Copy link

kastork commented Apr 21, 2018

This works for getting Kotlin to install also. Almost.
The archive won't unzip for some reason.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants