【发布时间】:2016-10-03 15:40:16
【问题描述】:
我有一个与 stagin pl 一起使用的小项目
[INFO] * Remote staging into staging profile ID "29ad9cd35d5f3"
[INFO] * Created staging repository with ID "bizaqutebnd-1010".
[INFO] * Staging repository at http://localhost:8081/nexus/service/local/staging/deployByRepositoryId/bizaqutebnd-1010
[INFO] * Uploading locally staged artifacts to profile biz.aQute.bnd
Uploading: http://localhost:8081/nexus/service/local/staging/deployByRepositoryId/bizaqutebnd-1010/biz/aQute/bnd/test.maven/1.0.1/test.maven-1.0.1.pom.asc
[ERROR] Remote staging finished with a failure: Failed to deploy artifacts: Could not transfer artifact biz.aQute.bnd:test.maven:pom.asc:1.0.1
from/to local (http://localhost:8081/nexus/service/local/staging/deployByRepositoryId/bizaqutebnd-1010):
Failed to transfer file: http://localhost:8081/nexus/service/local/staging/deployByRepositoryId/bizaqutebnd-1010/biz/aQute/bnd/test.maven/1.0.1/test.maven-1.0.1.pom.asc.
Return code is: 401, ReasonPhrase: Unauthorized.
由于我可以创建临时存储库,因此我似乎不可避免地要获得许可。使用 curl 命令测试上传:
curl -u admin:admin123 -X PUT -H Content-Type:foo --data @pom.xml http://localhost:8081/nexus/service/local/staging/deployByRepositoryId/bizaqutebnd-1009/biz/aQute/bnd/test.maven/1.0.1/test.maven-1.0.1.pom.asc
成功且没有错误。
一脸懵逼……
【问题讨论】: