rundeck-plugins / git-plugin

10 stars 21 forks source link

Gitlab subgroups not supported #15

Closed Seathex closed 4 years ago

Seathex commented 5 years ago

Hi,

I'm dealing with the problem in title.

When i use the plugin with an https or ssh url with groups/subgroup/project the output give me a null pointer exception. Exemple url : ssh://git@/Group/Subgroup/project.git

` java.lang.NullPointerException

17:01:57 |   |   | at org.eclipse.jgit.lib.ObjectIdOwnerMap.get(ObjectIdOwnerMap.java:131) 17:01:57 |   |   | at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:857) 17:01:57 |   |   | at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:772) 17:01:57 |   |   | at org.eclipse.jgit.api.RebaseCommand.call(RebaseCommand.java:296) 17:01:57 |   |   | at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:324) 17:01:57 |   |   | at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:80) 17:01:57 |   |   | at java_util_concurrent_Callable$call$0.call(Unknown Source) 17:01:57 |   |   | at com.rundeck.plugin.GitManager.performPull(GitManager.groovy:122) 17:01:57 |   |   | at com.rundeck.plugin.GitManager.this$2$performPull(GitManager.groovy) 17:01:57 |   |   | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 17:01:57 |   |   | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 17:01:57 |   |   | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 17:01:57 |   |   | at java.lang.reflect.Method.invoke(Method.java:498) 17:01:57 |   |   | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210) 17:01:57 |   |   | at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59) 17:01:57 |   |   | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169) 17:01:57 |   |   | at com.rundeck.plugin.GitManager.cloneOrCreate(GitManager.groovy:71) 17:01:57 |   |   | at com.rundeck.plugin.GitManager$cloneOrCreate$0.call(Unknown Source) 17:01:57 |   |   | at com.rundeck.plugin.GitCloneWorkflowStep.executeStep(GitCloneWorkflowStep.groovy:128) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.steps.StepPluginAdapter.executeWorkflowStep(StepPluginAdapter.java:114) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:111) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWFItem(BaseWorkflowExecutor.java:291) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWorkflowStep(BaseWorkflowExecutor.java:687) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.engine.StepCallable.apply(StepCallable.java:71) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:73) 17:01:57 |   |   | at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:31) 17:01:57 |   |   | at com.dtolabs.rundeck.core.rules.WorkflowEngineOperationsProcessor.lambda$processRunnableOperations$1(WorkflowEngineOperationsProcessor.java:222) 17:01:57 |   |   | at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) 17:01:57 |   |   | at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) 17:01:57 |   |   | at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) 17:01:57 |   |   | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 17:01:57 |   |   | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 17:01:57 |   |   | at java.lang.Thread.run(Thread.java:748) 17:01:57 |   |   | Failed pulling the repository from ssh://git@/group/subgroup/project.git: null (data obfuscated) 17:01:57 |   |   | Execution failed: 147 in project Pole_Datascientist: [Workflow result: , step failures: {1=PluginFailed: No such property: op for class: com.rundeck.plugin.GitCloneWorkflowStep}, flow control: Continue, status: failed] `

Seathex commented 4 years ago

My bad, i think it was a problem with my rundeck, it's working now.

brunopadz commented 4 years ago

hey @Seathex, how did you solve it?

MegaDrive68k commented 4 years ago

Usually, this happens with a "bad-filled" Git URL textbox.

Check this (tested):

https://stackoverflow.com/a/61080979

Greetings.