I'm running SBT 1.1.1 on Windows.
If I put the following line in my build.sbt, my build is OK:
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
The trouble is, I don't particularly want to leave this kind of machine-specific configuration in my project. Also, in order to use g8 templates I need to have a working global config.
But if I put the same text in a file called credentials.sbt in the following directories it seems not to work.
- %USERPROFILE%/.sbt/1.1/plugins/credentials.sbt
- %USERPROFILE%/.sbt/1.1/credentials.sbt
- %USERPROFILE%/.sbt/plugins/credentials.sbt
So where should this file go?
Whichever location I put the file in I get the following errors:
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].
I know that my credentials must be good because I use the exact same credentials to boot SBT in the first place.
Bizarrely, even though I'm running sbt-1.1.1 it seems to be wanting to load plugins from %USERPROFILE%\.sbt\1.0\plugins
- which makes very little sense to me, the version numbers do not match. Even though I know the file is being read I still get the error messages.