this tutorial explains clearly how to have a remote github depency dependence in an sbt project using:
lazy val reponame = RootProject(uri("git://github.com/group/reponame.git"))
lazy val root = Project(id = "MLSS", base = file("."), settings = sharedSettings) dependsOn(reponame)
However if the remote repo is private, it doesn't seem to work and throws a
Repository not found.
Cloning into '/Users/.../b6958781f05b85672849/reponame'...
[error] Nonzero exit code (128): git clone git://github.com/group/reponame.git
it seems to be an auth error but how to specify the key? thanks
For a private repo, you want to use SSH so authentication uses your keys instead of a username & password. The github provided SSH url [email protected]:group/reponame.git
isn't a correctly formed URI, but it's equivalent to ssh://[email protected]/group/reponame.git
. I just tried a uri dependency on a private repo URL formatted that way and it worked for me. Reference.
just using the https version worked fine to clone the repo (provided you have the key in your sshconfig) but it doesn't add the modules to the classpath:
lazy val pogistan = RootProject(uri("https://github.com/group/reponame.git"))
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