如何在经过身份验证的代理后面使用 sbt? [英] How to use sbt behind authenticated proxy?
问题描述
如其他答案中所述.我已经正确设置了 http 代理主机和端口的值.但它给出了以下错误
As given in other answers. I have properly set the value of http proxy host and port. but it is giving the following error
Getting org.scala-sbt sbt 0.13.6 ...
您可能通过未正确配置的代理服务器访问目标服务器.您可能通过未正确配置的代理服务器访问目标服务器.您可能通过配置不正确的代理服务器访问目标服务器.
You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured. You probably access the destination server through a proxy server that is not well configured.
:: 问题总结:::::: 警告找不到主机 repo.typesafe.com.url=https:///repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
:: problems summary :: :::: WARNINGS Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom
Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.jar
module not found: org.scala-sbt#sbt;0.13.6
==== local: tried
/home/vibhanshu/.ivy2/local/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.6!sbt.jar:
/home/vibhanshu/.ivy2/local/org.scala-sbt/sbt/0.13.6/jars/sbt.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom
-- artifact org.scala-sbt#sbt;0.13.6!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.6: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: 使用详细或调试消息级别以获取更多详细信息未解决的依赖项:org.scala-sbt#sbt;0.13.6:未找到sbt 执行期间出错:检索所需库时出错(有关完整日志,请参阅/home/vibhanshu/.sbt/boot/update.log)错误:无法检索 sbt 0.13.6
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS unresolved dependency: org.scala-sbt#sbt;0.13.6: not found Error during sbt execution: Error retrieving required libraries (see /home/vibhanshu/.sbt/boot/update.log for complete log) Error: Could not retrieve sbt 0.13.6
推荐答案
如果你在代理后面(企业网络)对于窗户:
If you are in behind the proxy(corporate network) For windows :
在 sbt 安装文件夹中,进入 conf/sbtconfig.txt 文件只需添加以下几行并保存并尝试.
In sbt installation folder, go to conf/sbtconfig.txt file just add the following lines and save and try.
-Dhttp.proxyHost=proxy
-Dhttp.proxyPort=portno
-Dhttp.proxyUser=UserId
-Dhttp.proxyPassword=Password
-Dhttps.proxyHost=proxyhost
-Dhttps.proxyPort=portno
-Dhttps.proxyUser=UserId
-Dhttps.proxyPassword=Password
对于 Linux/Unix:
For Linux/Unix:
export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=proxyHost -Dhttp.proxyPort=proxyPortNumber -Dhttp.proxyUser=UserId -Dhttp.proxyPassword=Password -Dhttps.proxyHost=proxyHost -Dhttps.proxyPort=proxyPortNumber -Dhttps.proxyUser=UserId -Dhttps.proxyPassword=Password"
它也对我有用.
这篇关于如何在经过身份验证的代理后面使用 sbt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!