【发布时间】:2018-08-16 20:48:47
【问题描述】:
我在 Windows 上运行 SBT 1.1.1。
如果我在 build.sbt 中加入以下行,我的构建就可以了:
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
麻烦的是,我并不想在我的项目中留下这种特定于机器的配置。此外,为了使用 g8 模板,我需要有一个有效的全局配置。
但是,如果我将相同的文本放在以下目录中名为 credentials.sbt 的文件中,它似乎不起作用。
- %USERPROFILE%/.sbt/1.1/plugins/credentials.sbt
- %USERPROFILE%/.sbt/1.1/credentials.sbt
- %USERPROFILE%/.sbt/plugins/credentials.sbt
那么这个文件应该放在哪里呢?
无论我将文件放在哪个位置,我都会收到以下错误:
C:\workspace\tmp>c:\apps\sbt-1.1.1\bin\sbt.bat new sbt/scala-seed.g8
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading settings from credentials.sbt ...
[info] Loading global plugins from C:\Users\NBKA0O5\.sbt\1.0\plugins
[info] Updating ProjectRef(uri("file:/C:/Users/NBKA0O5/.sbt/1.0/plugins/"), "global-plugins")...
[error] Unable to find credentials for [Artifactory Realm @ artifactory.company.com].
[error] Unable to find credentials for [Artifactory Realm @ artifactory.company.com].
我知道我的凭据一定很好,因为我首先使用完全相同的凭据来启动 SBT。
奇怪的是,即使我正在运行 sbt-1.1.1,它似乎也想从 %USERPROFILE%\.sbt\1.0\plugins 加载插件——这对我来说意义不大,版本号不匹配。即使我知道文件正在被读取,我仍然会收到错误消息。
【问题讨论】:
标签: sbt