3

我有 SBT、Scala 和 giter8。当我g8在命令行上输入时,它说它安装得很好,但是当我使用它从 GitHub 存储库中设置模板时,即

g8 ajhager/libgdx-sbt-project

它抛出以下异常:

java.lang.IllegalArgumentException: Invalid wildcards +refs/pull/*/head:refs/remotes/origin/pr/*
        at org.eclipse.jgit.transport.RefSpec.<init>(RefSpec.java:142)
        at org.eclipse.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:176)
        at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:151)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
        at giter8.Apply$class.clone(apply.scala:73)
        at giter8.Giter8.clone(giter8.scala:3)
        at giter8.Apply$class.inspect(apply.scala:33)
        at giter8.Giter8.inspect(giter8.scala:3)
        at giter8.Apply$class.inspect(apply.scala:46)
        at giter8.Giter8.inspect(giter8.scala:3)
        at giter8.Giter8$$anonfun$2.apply(giter8.scala:19)
        at giter8.Giter8$$anonfun$2.apply(giter8.scala:18)
        at scala.Option.map(Option.scala:133)
        at giter8.Giter8.run(giter8.scala:18)
        at giter8.Giter8.run(giter8.scala:10)
        at giter8.Giter8.run(giter8.scala:3)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
        at xsbt.boot.Launch$.run(Launch.scala:57)
        at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
        at xsbt.boot.Launch$.launch(Launch.scala:65)
        at xsbt.boot.Launch$.apply(Launch.scala:16)
        at xsbt.boot.Boot$.runImpl(Boot.scala:32)
        at xsbt.boot.Boot$.main(Boot.scala:21)
        at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.IllegalArgumentException: Invalid wildcard
s +refs/pull/*/head:refs/remotes/origin/pr/*

是什么原因造成的?我使用 PowerShell,只是想建立一个libgdx sbt 项目。

4

1 回答 1

2

可能是您执行的环境 - Git Shell / PowerShell -g8干扰并因此出现错误。

g8在Windows 上执行,cmd因此不会与 git 相关的配置生效。

于 2014-01-08T22:39:37.313 回答