我们最近移至 AWS codeartifact 存储库。我们几乎没有需要构建的基于 SBT 的项目。
这是我的全局设置:
~/.sbt/0.13/plugins/credentials.sbt
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
~/.sbt/.credentials
realm=Sonatype Nexus Repository Manager
host=somedomain-1234567890.d.codeartifact.ap-southeast-1.amazonaws.com
user=aws
password=xxxxxxxxxxxxxxxxxx
password
来自下面的哪里CODEARTIFACT_AUTH_TOKEN
:
export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain somedomain --domain-owner 1234567890 --query authorizationToken --output text`
在项目级别,我有
./build.sbt
...
resolvers := Seq(
...
"Private Nexus" at "https://somedomain-1234567890.d.codeartifact.ap-southeast-1.amazonaws.com/maven/superone-snapshots",
...
)
...
但是,当sbt compile
我仍然得到:
[error] Unable to find credentials for [somedomain/superone-snapshots @ somedomain-1234567890.d.codeartifact.ap-southeast-1.amazonaws.com].
[error] Is one of these realms misspelled for host [somedomain-1234567890.d.codeartifact.ap-southeast-1.amazonaws.com]:
[error] * Sonatype Nexus Repository Manager
有没有人成功让 build.sbt 解析为 AWS CodeArtificat?
谢谢。