sbt-ghpages icon indicating copy to clipboard operation
sbt-ghpages copied to clipboard

Nonzero exit code (128) running git.

Open pathikrit opened this issue 9 years ago • 8 comments

─pbhowmick at osxmb-46 in ~/Projects/better-files on master✘✘✘ using ‹› 15-09-23 - 23:00:15
╰─⠠⠵ sbt ghpages-push-site
[info] Loading global plugins from /Users/pbhowmick/.sbt/0.13/plugins
[info] Loading project definition from /Users/pbhowmick/Projects/better-files/project
[info] Set current project to better-files (in build file:/Users/pbhowmick/Projects/better-files/)
[error] fatal: Not a git repository (or any of the parent directories): .git
java.lang.RuntimeException: Nonzero exit code (128) running git.
    at scala.sys.package$.error(package.scala:27)
    at scala.Predef$.error(Predef.scala:142)
    at com.typesafe.sbt.git.ConsoleGitRunner$.apply(ConsoleGitRunner.scala:30)
    at com.typesafe.sbt.git.GitRunner$class.pull(GitRunner.scala:21)
    at com.typesafe.sbt.git.ConsoleGitRunner$.pull(ConsoleGitRunner.scala:7)
    at com.typesafe.sbt.git.GitRunner$class.updated(GitRunner.scala:24)
    at com.typesafe.sbt.git.ConsoleGitRunner$.updated(ConsoleGitRunner.scala:7)
    at com.typesafe.sbt.SbtGhPages$ghpages$$anonfun$updatedRepo$1.apply(SbtGhPages.scala:45)
    at com.typesafe.sbt.SbtGhPages$ghpages$$anonfun$updatedRepo$1.apply(SbtGhPages.scala:44)
    at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:35)
    at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:ghpagesUpdatedRepository) Nonzero exit code (128) running git.
[error] Total time: 0 s, completed Sep 23, 2015 11:00:24 PM
╭─pbhowmick at osxmb-46 in ~/Projects/better-files on master✘✘✘ using ‹› 15-09-23 - 23:00:36
╰─⠠⠵ ssh -T [email protected]
Hi pathikrit! You've successfully authenticated, but GitHub does not provide shell access.

pathikrit avatar Sep 24 '15 05:09 pathikrit

Same problem here. Didn't have this problem with version 0.5.3. I guess the updated version of sbt-git is the culprit?

ummels avatar Oct 12 '15 20:10 ummels

I investigated a little bit more and it seems this is related to 97eb131c3ba9d513381f9d65122b9ad4345a1472 since the working directory ~/.sbt/ghpages/<buildHash>/<organization>/<name> is empty on my machine whereas the directory used by the old version ~/.sbt/ghpages/<organization>/<name> does contain the cloned repository. I could well imagine that this is some problem with the OS X file system since the bug does not seem to materialise on Linux.

ummels avatar Oct 12 '15 21:10 ummels

Hmm, after manually deleting ~/.sbt/ghpages/<buildHash>, everything seems to be working fine again. So I don't really know how I ended up with ~/.sbt/ghpages/<buildHash>/<organization>/<name> missing the repository data in .git.

ummels avatar Oct 13 '15 08:10 ummels

@ummels Thanks for reporting/investigating. We may need to see if we can write a "stale repo" checker and clean that out. I think the "does the repo exist" check is pretty naive right now...

jsuereth avatar Oct 13 '15 11:10 jsuereth

Yes, removing the ~/.sbt/ghpages/xxxx fixed it for me too. Not quite sure how it was in a broken state...

pathikrit avatar Oct 13 '15 18:10 pathikrit

@ummels I ended up in the same situation. It appears an easy way to get there is to have an invalid git.remoteRepo setting when you run ghpages-push-site. I hadn't set mine yet, so it was entirely absent. After I set git.remoteRepo, it wouldn't work until I deleted the repository repo sbt-ghpages created.

justinp avatar Jan 10 '16 15:01 justinp

I've the same issue with a travis build. Switching back to 0.5.3 fixes the issue.

akkie avatar May 30 '16 14:05 akkie

I've found that if no organization value is set in your build.sbt, this error happens.

xerial avatar Sep 26 '17 20:09 xerial