使用管理员身份验证的sonatype私有maven存储库响应401

时间:2016-06-25 09:00:53

标签: maven sbt sonatype

我使用nexus-3.0.0-03-mac.dmg

安装私人专家

build.sbt凭据中使用admin,我确保密码正确

...
credentials += Credentials("local","localhost:7070","admin","admin123")

publishTo <<= version { (v: String) =>
    Some("releases"  at "http://localhost:7070/nexus/repository/maven-releases/")
}
...

使用cmd:sbt publish获取错误

 Failed to deploy artifacts: Could not transfer artifact com.lorancechen:rxsocket_2.11:jar:0.9.4 from/to releases (http://localhost:7070/nexus/repository/maven-releases/): Unauthorized (401)

我不知道为什么在使用管理员的情况下获得401。

1 个答案:

答案 0 :(得分:0)

尝试更改&#34; local&#34;的域名。到&#34; Sonatype Nexus&#34;。

credentials += Credentials("Sonatype Nexus","localhost:7070","admin","admin123")

请注意,我们会将Nexus 3.1中的域名更改为&#34; Sonatype Nexus Repository Manager&#34;匹配当前的Nexus 2.x领域名称:

https://issues.sonatype.org/browse/NEXUS-10390