Konstanius / MineCICD

Git for Minecraft Servers! Track changes, speed up development, rollback changes, and much more!
GNU General Public License v3.0
13 stars 1 forks source link

Ref cannot be resolved #11

Closed Gresakm closed 1 month ago

Gresakm commented 2 months ago

Hello, when I try to /minecicd pull I get this error in the console, can't use a branch other than the default. Branch dev exists on github, I also tried gitlab with the same result, also on a clean Minecraft server.

minecicd pull
[20:43:48 ERROR]: [MineCICD] Failed to pull changes
[20:43:48 ERROR]: [MineCICD] Ref dev cannot be resolved
org.eclipse.jgit.api.errors.RefNotFoundException: Ref dev cannot be resolved
        at MineCICD-2.1.2.jar/org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:224) ~[MineCICD-2.1.2.jar:?]
        at MineCICD-2.1.2.jar/ml.konstanius.minecicd.GitUtils.pull(GitUtils.java:292) ~[MineCICD-2.1.2.jar:?]
        at MineCICD-2.1.2.jar/ml.konstanius.minecicd.BaseCommand.lambda$onCommand$0(BaseCommand.java:211) ~[MineCICD-2.1.2.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.jar:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[20:43:48 ERROR]: [MineCICD] MineCICD-2.1.2.jar//org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:224)
MineCICD-2.1.2.jar//ml.konstanius.minecicd.GitUtils.pull(GitUtils.java:292)
MineCICD-2.1.2.jar//ml.konstanius.minecicd.BaseCommand.lambda$onCommand$0(BaseCommand.java:211)
org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
java.base/java.lang.Thread.run(Thread.java:1583)

[20:43:48 INFO]: [MineCICD] Error pulling repo: Ref dev cannot be resolved
Konstanius commented 1 month ago

Confirmed to be a bug, probably caused due to the initial repo setup locally being done with a set branch name.

For now, workaround is to perform the initial pull with the default branch name, then change the branch name to dev and try again. A fix will be implemented at some time.

Konstanius commented 1 month ago

The guess in my previous comment has been confirmed, once version 2.1.4-Release is merged into the master branch I will create a new release.

Work on #12 will be done for this branch as well though, so expect a delay.