sbt抛出[error]服务器访问错误:连接被拒绝(连接被拒绝)url=http://repo.typesafe.com/

klsxnrf1  于 2021-07-08  发布在  Java
关注(0)|答案(2)|浏览(621)

我打扫了房间 ~/.ivy2/cache 目录。
我的 project/plugins.sbt 文件:

$ cat project/plugins.sbt
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Local Maven Repository" at "file:///"+Path.userHome.absolutePath+"/.m2/repository"
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.10")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.3.2")

我的我的 ~/.sbt/repositories 文件:

$ cat ~/.sbt/repositories
[repositories]
  local
  activator-launcher-local: file://${activator.local.repository-${activator.home-${user.home}/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  activator-local: file://${activator.local.repository-/Users/debodirno/activator-dist-1.3.12/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-releases-repo: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: https://repo1.maven.org/maven2/
  typesafe-releases: https://repo.typesafe.com/typesafe/releases
  typesafe-ivy-releasez: https://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

我在跑步 activator clean :

$ activator clean
[info] Loading project definition from /Users/debodirno/personal/src/sitesearch/project
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.iq80.leveldb/leveldb/0.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.iq80.leveldb/leveldb/0.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.iq80.leveldb/leveldb-api/0.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.iq80.leveldb/leveldb-api/0.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-all/1.7/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-all/1.7/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni/1.7/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni/1.7/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.hawtjni/hawtjni-runtime/1.8/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.hawtjni/hawtjni-runtime/1.8/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-osx/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-osx/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-linux32/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-linux32/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-linux64/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-linux64/1.5/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-win32/1.5/ivys/ivy.xml
...
...
...

基本上,我想知道它是从哪里得到的http://repo.typesafe.com/typesafe/ivy-releases/ 而且,我没有改变我的项目的配置,所以为什么这个突然失败了。

0tdrvxhp

0tdrvxhp1#

在向build.sbt添加额外的类型安全https解析器后能够解析。默认情况下,sbt选择http。如果您已经配置了解析器(就像我配置了maven一样),那么新行很重要,否则您可以使用seq construct)
解析器+=“maven central server”在https://repo1.maven.org/maven2"
解析程序+=“typesafe server”at“https://repo.typesafe.com/typesafe/releases"

8oomwypt

8oomwypt2#

我的解析器设置为“http://repo.typesafe.com/typesafe/releases/“将解析器改为使用https使其工作。

相关问题