Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

scala

sbt

After having installed sbt version 0.13.13 (with brew) on Mac 10.12.2 with scala 2.12.0, I tried the first example on the documentation (as per subject sbt new sbt/scala-seed.g8).

The result is:

...
[info] Set current project to hello (in build file:/scratch/hello/)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.eclipse.jgit.api.errors.TransportException: http://github.com/sbt/scala-seed.g8.git: 301 Moved Permanently
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
...

I'm absolutely new on sbt, just wondering if this is an issue due to my inexperience...

like image 416
Mario Alemi Avatar asked Jan 04 '17 14:01

Mario Alemi


1 Answers

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.

like image 138
Sully Avatar answered Oct 08 '22 02:10

Sully