2017-09-27 63 views
3

失败当我尝试用这个命令创建ScalaTest例如:SBT新斯卡拉/ scalatest.g8上TransportException

sbt new scala/scalatest-example.g8 fails on TransportException 

我得到如下:

[info] Set current project to scala (in build file:/Users/chasrmartin/Dropbox/Etudes/Scala/) 
[error] org.eclipse.jgit.api.errors.TransportException: [email protected]:scala/scalatest-example.g8.git: Auth fail 
[error]  at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139) 
[error]  at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193) 

我试过几种解决方法从下一个(例如this SO question)到无效。看起来这应该是一个简单的问题,我从初学者教程中得到了这个命令。

更新

我从https://www.scala-lang.org/documentation/getting-started-sbt-track/testing-scala-with-sbt-on-the-command-line.html

Screenshot

+0

我在斯卡拉回购https://github.com/scala搜索,他们没有这个scalatest.g8和scalatest-example.g8。你确定它是来自Scala吗? – inafalcao

+0

你想要得到这个吗? https://github.com/bernhard-42/scala-test.g8 – inafalcao

+1

请参阅上文,它来自scala-lang.org上的示例。 –

回答

3

得到这个命令该项目似乎并不存在了。 相反,我宁愿与正常斯卡拉 - seed.g8

> sbt new scala/scala-seed.g8 

运行,并手动添加的测试类。 This是一个具有相同类和测试的等价教程。

scala种子模板已经带有您想要的结构,并具有测试依赖性。通常您可以运行sbt test