Sbt 项目依赖于外部 &私有 github 存储库 [英] Sbt project depending on a external & private github repository

查看:32
本文介绍了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天全站免登陆