Sbt项目取决于外部&私人github存储库 [英] Sbt project depending on a external & private github repository

查看:191
本文介绍了Sbt项目取决于外部&私人github存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本教程清楚地说明了如何在一个sbt项目中使用远程github依赖依赖:

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

推荐答案

只要使用https版本,就可以很好地克隆repo(假设您的密钥在您的sshconfig ),但不会将模块添加到类路径中:

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"))

这篇关于Sbt项目取决于外部&私人github存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆