2017-06-18 88 views
1

我一直在獲取服務器訪問被拒絕的錯誤。無法找到修復。通過web.But調查,但沒有一個工作得很好。我使用的是windows7。SBT buid錯誤:[錯誤]服務器訪問錯誤:收到致命警報:access_denied

C:\Users\thathine>sbt 
    Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup 
    port was removed in 8.0 
    [info] Loading project definition from C:\Users\thathine\project 
    [info] Updating {file:/C:/Users/thathine/project/}thathine-build... 
    [info] Resolving org.scala-lang#scala-library;2.11.8 ... 
    [error] Server access Error: Received fatal alert: access_denied url=https://rep 
    o.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.11.8/ivys/iv 
    y.xml 
    [error] Server access Error: Received fatal alert: access_denied url=https://rep 
    o.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.11.8 
    /ivys/ivy.xml 

buld.sbt如下:

name := "spark_codebase" 

version := "1.0" 

scalaVersion := "2.11.8" 

我需要爲儘快解決這一問題。請提出任何解決方案。提前感謝。

請找到斯卡拉,JAVA的版本,SBT:

C:\Users\thathine>javac -version 
javac 1.8.0_131 

C:\Users\thathine>scala -version 
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL 

和SBT版本sbt-0.13.15

回答

1

經過一番爭論後,發現這個問題是因爲我們公司的網絡使用了一些代理來限制訪問像防火牆這樣的員工。由於我在代理之後,Maven無法下載任何依賴關係。

我從我公司的IT服務檯獲取了代理服務器。在使用它們之後,它終於起作用了。我正在使用windows 7.在使用sbt進行該會話之前,使用以下命令行選項,將[your-ProxyServer]<port-number>替換爲您的實際代理服務器和端口詳細信息。

set JAVA_OPTS=-Dhttp.proxySet=true -Dhttp.proxyHost=[your-ProxyServer] -Dhttp.proxyPort=<port-number> -Dhttps.proxyHost=[your-ProxyServer] -Dhttps.proxyPort=<port-number> -Dftp.proxyHost=[your-ProxyServer] -Dftp.proxyPort=<port-number> 

如果使用IDE的IntelliJ一樣或者Eclipse: 使用下-VM參數相同的選項,在創建/導入項目。