在使用scala 2.12.0在Mac 10.12.2上安装sbt版本0.13.13(使用brew)之后,我尝试了文档中的第一个示例(根据主题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)
...
Run Code Online (Sandbox Code Playgroud)
我是个新人,只是想知道这是不是因为我的经验不足...
小智 25
我遇到过同样的问题.即使您可以访问http://github.com/sbt/scala-seed.g8.git,使用sbt或g8时仍可能阻止您的git 9418端口.尝试在命令行运行下面的行.它会将git使用的端口切换为https://,这通常不会被阻止.
git config --global url."https://".insteadOf git://
Run Code Online (Sandbox Code Playgroud)
它只是将以下行添加到.gitconfig中
[url "https://"]
insteadOf = git://
Run Code Online (Sandbox Code Playgroud)
因此,如果不是问题,您可以轻松删除它.
dsa*_*lla 12
运行它作为git url的参数传递:
sbt new https://github.com/sbt/scala-seed.g8
Run Code Online (Sandbox Code Playgroud)
无需更改任何git配置.
| 归档时间: |
|
| 查看次数: |
4921 次 |
| 最近记录: |