title: How can I provide SBT credentials to my private Artifactory server from a Windows workstation?
body: <p>I'm using sbt 0.13.13 behind a corporate firewall on a Windows desktop.</p>
  
  <p>We have an Artifactory which seems to be working very well for other build-tools, but I also want to get SBT working, however I'm not even able to make sbt 0.13.x boot!</p>
  
  <p>When I try to boot SBT I get this error from the launcher:</p>
  
  <pre><code>C:\workspace\aggregator2&gt;c:\apps\sbt-0.13.13\sbt-launcher-packaging-0.13.13\bin\sbt
  Getting org.scala-sbt sbt 0.13.13 ...
  
  :: problems summary ::
  :::: WARNINGS
                  module not found: org.scala-sbt#sbt;0.13.13
  
          ==== local: tried
  
            C:\Users\USERNAME\.ivy2\local\org.scala-sbt\sbt\0.13.13\ivys\ivy.xml
  
            -- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
  
            C:\Users\USERNAME\.ivy2\local\org.scala-sbt\sbt\0.13.13\jars\sbt.jar
  
          ==== my-ivy-proxy-releases: tried
  
            http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
  
          ==== my-maven-proxy-releases: tried
  
            http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.pom
  
            -- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
  
            http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.jar
  
                  ::::::::::::::::::::::::::::::::::::::::::::::
  
                  ::          UNRESOLVED DEPENDENCIES         ::
  
                  ::::::::::::::::::::::::::::::::::::::::::::::
  
                  :: org.scala-sbt#sbt;0.13.13: not found
  
                  ::::::::::::::::::::::::::::::::::::::::::::::
  </code></pre>
  
  <p>Actually those URLs do exist - when I hit them with Chrome or Curl and provide credentials I am able to retrieve all the required resources.</p>
  
  <p>When I look at the log I can see what's going on:</p>
  
  <pre><code>try to get credentials for: Artifactory Realm@artifactory.bigcompany.com
  authentication: k='Artifactory Realm@artifactory.bigcompany.com' c='null'
  HTTP response status: 401 url=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
  CLIENT ERROR: Unauthorized url=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
      my-ivy-proxy-releases: resource not reachable for org.scala-sbt#sbt;0.13.13: res=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
      my-ivy-proxy-releases: no ivy file found for org.scala-sbt#sbt;0.13.13
  </code></pre>
  
  <p>So it's clear that no credentials (or the wrong credentials are being sent). So I looked at how I've got it set up. I have a credentials file which looks something like this in <strong>%USERPROFILE%/.sbt/.credentials</strong></p>
  
  <pre><code>realm=Artifactory Realm
  host=artifactory.bigcompany.com
  user=USERNAME
  password=&lt;my api key&gt;
  </code></pre>
  
  <p>And I have a "plugin" file located at <strong>%USERPROFILE%.sbt\0.13\plugins\credentials.sbt</strong> which looks like this:</p>
  
  <pre><code>credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
  </code></pre>
  
  <p>And I'm invoking sbt like this:</p>
  
  <pre><code>c:\apps\sbt-0.13.13\sbt-launcher-packaging-0.13.13\bin\sbt
  </code></pre>
  
  <p>Looking again at the logs - there's nothing at all which suggests that the credentials.sbt plugin has loaded, which in turn suggests that I've put the file in the wrong location or that there's something else about it that makes it unusable.</p>
  
  <p>So can somebody help me - how do I need to tweak this setup so that it actually works? Is there some missing </p>