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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With