为什么 Artifactory 会为具有匿名读取权限的工件返回“401 unauthorized”?

问题描述 投票:0回答:1

我成功地向 Artifactory 发布了一个 sbt 仓库。

我还成功地从一个测试项目中使用了这个 repo,其中 build.sbt 是

credentials += Credentials(Path.userHome / ".sbt" / ".credentials")

resolvers += "Artifactory" at "https://hyperbot.jfrog.io/artifactory/hyperbot/"

libraryDependencies += "com.example" % "scalautils_2.13" % "0.1.0-SNAPSHOT"

但是,如果我不在 build.sbt 中提交我的凭据,那么构建会返回 401 unathorized 错误以解决

"com.example" % "scalautils_2.13" % "0.1.0-SNAPSHOT"
依赖关系。

如果我尝试打开工件 url

https://hyperbot.jfrog.io/artifactory/hyperbot/com/example/scalautils_2.13/0.1.0-SNAPSHOT/scalautils_2.13-0.1.0-SNAPSHOT.pom

在浏览器中,它要求提供凭据(如果我提供凭据,就会提供工件)。

匿名用户的权限设置为在此存储库中读取。

我该怎么做才能允许匿名访问此工件?

dependencies sbt artifactory unauthorized
1个回答
2
投票

匿名用户设置访问权限还不够,还需要开启匿名访问:

问题解决了

© www.soinside.com 2019 - 2024. All rights reserved.