Skip to content

Instantly share code, notes, and snippets.

@FlakM
Last active October 18, 2019 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save FlakM/0188ab830e047278343f1b345a0eb4bf to your computer and use it in GitHub Desktop.
Save FlakM/0188ab830e047278343f1b345a0eb4bf 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