I’m trying out the CLI demo, but I can’t seem to make it work. This is the error I get after adding a file to parent/app and trying to pushing it to parent.git:
git push
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 326 bytes | 326.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Error: Could not find or load main class org.tmatesoft.gitx.cli.install.GxPreReceiveHook
remote: Caused by: java.lang.ClassNotFoundException: org.tmatesoft.gitx.cli.install.GxPreReceiveHook
Hello Panolo,
the ‘pre-receive’ hook (located at GIT_REPO/hooks/pre-receive) just tries to run org.tmatesoft.gitx.cli.install.GxPreReceiveHook class from gx/lib/gitx-VERSION-BUILD_fat.jar
before the last line of the hook and re-try pushing.
This will print the command the hook is trying to execute. There’s a chance that you would notice something wrong with it…
May I also ask what is you OS and Java version?
Finally I would like to note that recently we’ve fixed several major issued in the tool and will publish an update soon. I hope we will be able to fix yours as well.
I mean that the fat jar should directly inside the Git repository: GIT_REPO/gx/lib/gitx-VERSION-BUILD_fat.jar not in the command line tool distribution.
The fat jar consists of all jars from the distribution dumped into a single file. So the ‘pre-receive’ hook in the Git repository will just execute a certain class in it.