3

I have SBT, Scala, and giter8. When I type g8 on the command line it says that it's installed fine, but when I use it to set up a template from a GitHub repository, i.e.

g8 ajhager/libgdx-sbt-project

it throws the following exception:

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/*

What's causing it? I use PowerShell, and just trying to get a libgdx sbt project set up.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
caustic6
  • 31
  • 2
  • What's the version of g8? It looks like the version might be pretty old and hence couldn't understand. There was [a bug](https://eclipse.googlesource.com/jgit/jgit/+/refs/tags/v3.0.0.201305281830-rc2%5E%5E!/) in jgit related to the error message. BTW, g8 0.6.0 worked fine for me. – Jacek Laskowski Jan 07 '14 at 21:19
  • Yeah, I just found that bug too. I just got giter8 yesterday, so I'm using 0.6.0 as well. I haven't downloaded jgit or anything though. Should I have? – caustic6 Jan 07 '14 at 23:45
  • So, I found out that the error is only in Git Shell. Using the default PowerShell, I can download templates, except it doesn't ask me to fill in parameters...but if I input random data it'll make a project for me. I had tried other shells before, but had assumed the program was frozen when it didn't ask for any input and didn't do anything. – caustic6 Jan 08 '14 at 05:12
  • I created a Community Wiki answer you can accept when you're satisfied with it. Change it when necessary. – Jacek Laskowski Jan 08 '14 at 22:40

1 Answers1

2

It may be that the environment(s) - Git Shell / PowerShell - you execute g8 in interferes and hence the error.

Execute g8 in cmd on Windows so no git-related configurations would come into effect.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420