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

查看:23
本文介绍了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 ,你的 git 9418 端口在使用 sbt 或 g8 时可能仍然被阻塞.尝试在命令行运行以下行.它将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天全站免登陆