score:27

Accepted answer

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.

score:0

I've experienced similar problem. The way I solved is by installing sdkman:

curl -s "https://get.sdkman.io" | bash 

Then, instead of my system package manager, I use sdkman to install the scala stuff:

sdk install java
sdk install sbt
sdk install scala

After that, the examples from the documentation works fine in my machine.

score:1

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.

score:1

I would like to share my experience:

I wanted to run sbt new scalatra/scalatra.g8 and was facing error

"git@github.com:scalatra/scalatra.g8.git: invalid privatekey: [...."

How fixed it ?

mkdir temp 
cd temp
git clone https://github.com/foundweekends/giter8.g8
g8 file://giter8.g8

Now it's working and printing

Creates a Giter8 project template. 

name [My Template Project]:

Hopefully it will save someone's time.

score:4

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)

score:15

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.


Related Query

More Query from same tag