HelloWorld 示例 (sbt new sbt/scala-seed.g8) 不起作用 [英] HelloWorld example (sbt new sbt/scala-seed.g8) not working

查看:28
本文介绍了HelloWorld 示例 (sbt new sbt/scala-seed.g8) 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 scala 2.12.0 的 Mac 10.12.2 上安装 sbt 版本 0.13.13(带 brew)后,我尝试了文档中的第一个示例(根据主题 sbt new sbt/scala-seed.g8).

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).

结果是:

...
[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)
...

我对 sbt 完全陌生,只是想知道这是否是由于我的经验不足造成的问题...

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

推荐答案

我遇到了同样的问题.即使您可以访问 http://github.com/sbt/scala-seed.g8.git ,使用 sbt 或 g8 时,您的 git 9418 端口可能仍然被阻止.尝试在命令行运行下面的行.它会将 git 使用的端口切换到 https://,通常不会被阻止.

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

它只是将以下几行添加到您的 .gitconfig

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.

这篇关于HelloWorld 示例 (sbt new sbt/scala-seed.g8) 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆