我正在尝试通过遵循本教程https://www.jfrog.com/confluence/display/RTF/SBT+Repositories使用sbt发布一些关于神器的scala项目,但我失败了。
我的build.sbt
resolvers += "Artifactory" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/"
credentials += Credentials("Artifactory Realm", "http://artifacts.xxxx.net:yyyy","user","password")
publishTo := Some("Artifactory Realm" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/")
〜/ .sbt / repositories
[repositories]
local
my-ivy-proxy-releases: http://artifacts.xxxx.net:yyyy/artifactory/sbt/,
[organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)
[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://artifacts.xxxx.net:yyyy/artifactory/sbt/
我遇到了以下错误:
java.io.IOException: Access to URL http://artifacts.xxxx.net/artifactory/sbt/project/project/1.0/project-1.0.jar was refused by the server: Unauthorized
at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:79)
答案 0 :(得分:1)
问题出在publishTo行,我们只需删除端口和http:
publishTo := Some("Artifactory Realm" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/")
通过
publishTo := Some("Artifactory Realm" at "artifacts.xxxxx.net/artifactory/sbt/")