>scala-cli version
Scala CLI version: 1.0.0-RC1
Scala version (default): 3.2.2
Describe the bug
On Windows 10, scala-cli fails after installation with the following error:
>scala-cli
Error: java.lang.Exception: java.lang.Exception: Error while getting https://github.com/coursier/jvm-index/raw/master/index.json: download error: Caught java.net.ConnectException (Connection refused: connect) while downloading https://github.com/coursier/jvm-index/raw/master/index.json
For more details, please see 'C:\Users\or\.scala-build\stacktraces\1680891948-3708010854185332807.log'
Running curl on the redirect target location https://raw.githubusercontent.com/coursier/jvm-index/master/index.json, will in fact download the expected index.json file.
Therefore, could this be caused by scala-cli not correctly handling the HTTP 302 redirect on Windows 10?
To Reproduce
Happens on every subsequent run, in CMD, Powershell, Git-Bash, with Firewall on or off.
scala-cli works fine on the same machine in WSL2 (Ubuntu 22.04).
Expected behaviour
scala-cli should download its dependencies during the first run.
This turned out to have been caused be an invalid root certificate in Windows. After removing it using the Windows certmgr, installation completed as expected.
Version(s) (on Windows 10)
Describe the bug On Windows 10, scala-cli fails after installation with the following error:
The log file states:
Using
curl https://github.com/coursier/jvm-index/raw/master/index.json
, will return a HTTP 302 redirect:Running
curl
on the redirect target locationhttps://raw.githubusercontent.com/coursier/jvm-index/master/index.json
, will in fact download the expected index.json file.Therefore, could this be caused by scala-cli not correctly handling the HTTP 302 redirect on Windows 10?
To Reproduce Happens on every subsequent run, in CMD, Powershell, Git-Bash, with Firewall on or off.
scala-cli works fine on the same machine in WSL2 (Ubuntu 22.04).
Expected behaviour scala-cli should download its dependencies during the first run.