sbt依赖解析器与基本认证
发布时间:2020-12-14 00:48:42 所属栏目:百科 来源:网络整理
导读:我有一个基本授权的我的maven仓库的nginx. 我的build.sbt有: credentials += Credentials("maven repository","rep.com","sbt","password")resolvers ++= Seq( "maven repository" at "http://rep.com:8080/") 但是,sbt找不到模块,因为sbt不使用基本的授权.
我有一个基本授权的我的maven仓库的nginx.
我的build.sbt有: credentials += Credentials("maven repository","rep.com","sbt","password") resolvers ++= Seq( "maven repository" at "http://rep.com:8080/" ) 但是,sbt找不到模块,因为sbt不使用基本的授权. 我的nginx日志看起来像: 012/07/22 20:02:21 [error] 3338#0: *14 no user/password was provided for basic authentication,client: 8.32.39.29,server: rep.com,request: "HEAD /some/cool_2.9.1/0.1-SNAPSHOT/cool_2.9.1-0.1-SNAPSHOT.pom HTTP/1.1",host: "rep.com:8080" 我不想通过nginx发布文物.基本认证只需要限制对工件的访问. 我如何限制访问和使用sbt中的存储库?
如何将以下内容添加到?/ .ivy2 / .credentials中:
realm=maven repository host=rep.com:8080 user=username password=password 然后使用Credentials(Path.userHome /“.ivy2”/“.credentials”) 您需要确保您的领域配置正确:curl http://rep.com:8080 -vv 2>& 1 | egrep“realm | host”(我可能会误会,但是’host’可能需要匹配主机头,即rep.com:8080,而不仅仅是rep.com). 心连心 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |