Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Samehadar/2bde73e16b05f5a73c52f54545ace140 to your computer and use it in GitHub Desktop.
Save Samehadar/2bde73e16b05f5a73c52f54545ace140 to your computer and use it in GitHub Desktop.
sbt with private artifactory

Setting up sbt with private repo

The solve was suggested here: sbt/sbt#2817

Steps for read access

  1. in ~/.sbt/repositories put:
[repositories]
local
maven-local
my-ivy-proxy-releases: http://mydomain.com/artifactory/sbt/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://mydomain.com/artifactory/sbt/
  1. Create a .credentials file, ~/.sbt/.credentials:
realm=Artifactory Realm
host=mydomain.com
user=<your-username>
password=<your-password>
  1. Before running sbt export SBT_CREDENTIALS varialble
export SBT_CREDENTIALS=${HOME}/.sbt/.credentials

Steps for publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment