5

I'm trying to fetch some dependencies from my private repo, however it seems like sbt is not able to find the credentials. There's also an error in my terminal whenever I try to fetch the dependencies

[error] Unable to find credentials for [Artifactory Realm @ artifactory.mydomain.com].

I read a couple of answers already, but none of them are working for me. What I did so far:

1) I configured my repo

cat ~/.sbt/repositories 
[repositories]
    local
    my-ivy-proxy-releases: https://artifactory.mydomain.com/my-ivy-release-local/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    my-maven-proxy-releases: https://artifactory.mydomain.com/my-ivy-release-local/

2) I created a .credentials file

cat ~/.sbt/.credentials 
realm=Artifactory Realm
host=artifactory.mydomain.com
user=myuser
password=mypassword

3) I exported the env variable SBT_CREDENTIALS

export SBT_CREDENTIALS=/Users/myuser/.sbt/.credentials

4) I created credentials.sbt in ~/.sbt/0.13/credentials as well as in ~/.sbt/0.13/plugins/credentials

cat ~/.sbt/0.13/credentials.sbt 
credentials += Credentials(Path.userHome / ".sbt" / ".credentials") 

When I try to access the dependency using curl, everything works just fine.

I read about some alleged solutions already, including:

SBT is unable to find credentials when attempting to download from an Artifactory virtual repo

How to access a secured Nexus with sbt?

How can I provide SBT credentials to my private Artifactory server from a Windows workstation?

Daniel
  • 874
  • 10
  • 31
  • Try to put `credentials += Credentials(Path.userHome / ".sbt" / ".credentials"),` in your project's settings in the project build.sbt itself. – Knows Not Much May 03 '18 at 12:21
  • does not help, i still get the same error – Daniel May 03 '18 at 13:05
  • one more thing i have just found out is that my credentials got added, at least update.log says so: credentials added: Artifactory Realm@artifactory.mydomain.com myuser/******** – Daniel May 03 '18 at 13:22

1 Answers1

2

I copied credentials.sbt to ~/.sbt/1.0 because i found this answer: Where should the SBT credentials configuration go? and it looks like it does the trick.

Daniel
  • 874
  • 10
  • 31