Windows上的sbt 0.13 - 无法访问存储库

时间:2017-03-28 17:44:33

标签: windows scala sbt

我已经完成了与在stackoverflow上安装sbt相关的几乎所有内容(有很多人对我有同样的问题)。但是,我的机器上的答案似乎不清楚/不可复制。

这是我做的:

  1. 在此site
  2. 上下载sbt-0.13.13
  3. 成功安装并设置PATH
  4. 尝试sbt version查看是否已成功安装。错误 返回(截至本文末尾)
  5. 我们应该知道一些事情:

    • 我已经有JDK

    • 我没有在我的计算机上使用代理(使用netsh winhttp show proxy测试)

    • 有人说这是因为sbt不支持ASCII字符 - 但是 解决方案不清楚

          problems summary
      WARNINGS
          module not found: org.fusesource.jansi#jansi;1.11
      
      local: tried
      
        C:\Users\buidu\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
      
        -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
      
        C:\Users\buidu\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
      
      ==== Maven Central: tried
      
        https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
      
        -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
      
        https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
      
      ==== typesafe-ivy-releases: tried
      
        https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
      
      ==== sbt-ivy-snapshots: tried
      
        https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
      
       UNRESOLVED DEPENDENCIES
      
       org.fusesource.jansi#jansi;1.11: not found
      
      Server access Error: Permission denied: connect url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
      
      Server access Error: Permission denied: connect url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
      
      Server access Error: Permission denied: connect url=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
      
      Server access Error: Permission denied: connect url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
      

3 个答案:

答案 0 :(得分:1)

您可以尝试配置IPV4(而不是IPV6)的使用,如此问题的接受答案中所述:

Error while importing sbt project , Server Access error, unresolved dependencies

setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true

答案 1 :(得分:0)

我一直在努力争取一周。唯一有帮助的是从默认位置(c:\ Program Files(x86)\ sbt)卸载sbt并将其重新安装到没有空格的某个位置(我已将其安装到d:\ sbt)。

答案 2 :(得分:0)

您是否尝试查看过sbt存储库文件(可能是c:\ users \ .sbt \ repositories,并指定http://而不是https://?