Search code examples
scalaintellij-ideasbtartifactoryivy

Jfrog + SBT unathorized error with valid credentials


My problem is that I'm getting unathorized error from jfrog artifactory

enter image description here

I have credentials file in ~/.ivy2/.credentials, credentials correct 100% because I can access JFrog from UI with this credentials.

I've tried everything:

  • Added SBT_CREDENTIALS to system env variables
  • Provided path to credentials as VM variable in Intellij Idea
  • Tried to run SBT server via PowerShell using command java --% -server -Dsbt.override.build.repos=true -Dsbt.boot.credentials=C:\Users\<USERNAME>\.ivy2\.credentials -jar "C:\Program Files (x86)\sbt\bin\sbt-launch.jar"
  • Provided same params as VM options via Intellij IDEA

No matter what I'm doing I'm getting unathorized from my JFrog artifactory. Maybe there is something that I'm missing, could you please help me?


Solution

  • The problem has been solved.

    1. Create .credentials file in .sbt folder
    2. Add this data to .credentials
    realm=Artifactory Realm
    host=<host>
    user=<username>
    password=<pass>
    
    1. Create credentials.sbt in .sbt/1.0/plugins
    2. Add credentials += Credentials(Path.userHome / ".sbt" / ".credentials") into credentials.sbt file

    Those steps solved problem for me!