HelloWorld example (sbt new sbt/scala-seed.g8) not working

Try using

sbt new scala/scala-seed.g8

A predefined template in git is required, but when you use one of the sample templates from git, it will create an sbt project with minimum scala build. And to name the project, the predefined templates usually provide you with an option to do so.


I had the same issue. Even if you can access http://github.com/sbt/scala-seed.g8.git , your git 9418 port may still be blocked when using sbt or g8. Try running the line below at the command line. It will switch the port that git uses to https:// which is usually not blocked.

git config --global url."https://".insteadOf git://

It simply adds the following lines to your .gitconfig

[url "https://"]
    insteadOf = git://

so you can easily remove it if that is not the issue.


Run it passing as a parameter the git url:

sbt new https://github.com/sbt/scala-seed.g8

There is no need of changing any git configuration.


git clone http://github.com/scala/hello-world.g8.git

mv ./hello-world.g8/src/main/g8 hello-world

cd hello-world

sbt run

(assuming you have git setup)

Tags:

Scala

Sbt