使用sbt从私有存储库中提取

时间:2015-11-30 12:19:36

标签: git sbt uri bitbucket

我正在尝试从bitbucket上的私有存储库中提取特定分支

这有效,但要求输入用户名和密码。

val projectname = uri("https://bitbucket.org/username/projectname.git#branchname")

我更喜欢使用ssh路由来避免输入用户名和密码(也适用于自动构建过程)。

 val projectname = uri("git@bitbucket.org:username/projectname.git#branchname")

但是我在尝试运行它时遇到了这个错误。

[error] java.net.URISyntaxException: Illegal character in scheme name at index 3: git@bitbucket.org:username/projectname.git#branchname

但是,我可以使用

克隆同一个项目
git clone git@bitbucket.org:username/projectname.git#branchname

是否有任何解决方案或解决方法?

1 个答案:

答案 0 :(得分:0)

网址格式错误。这个有效。

 val projectname = uri("ssh://git@bitbucket.org/username/projectname.git#branchname")

感谢@jsuereth的建议。

相关问题