Jenkins and plugins versions report
Environment
Using docker image jenkins/jenkins:lts-jdk21 on Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-177-generic x86_64)
Note: The problem occurred after rebuilding the container one day ago, so it was probably introduced in a recent publication of the tag.
What Operating System are you using (both controller, and any agents involved in the problem)?
Using docker image jenkins/jenkins:lts-jdk21 on Ubuntu host
Reproduction steps
- Create a job name that contains parentheses on a controller that uses manually provided host keys to validate the SSH connection for git
- Have it use a Jenkinsfile from git
- Run it
Expected Results
Job should run without problems (and it used to work since years)
Actual Results
Git checkout fails with Syntax error: "(" unexpected
Full output:
10:26:14 > git fetch --tags --force --progress -- ssh://git@hidden.domain.name:7722/util/jenkins-shared-library.git +refs/heads/*:refs/remotes/origin/* # timeout=10
10:26:14 ERROR: Error fetching remote repo 'origin'
10:26:14 hudson.plugins.git.GitException: Failed to fetch from ssh://git@hidden.domain.name:7722/util/jenkins-shared-library.git
10:26:14 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:998)
10:26:14 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1239)
10:26:14 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1310)
10:26:14 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)
10:26:14 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever.lambda$doRetrieve$4(SCMBasedRetriever.java:200)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever.retrySCMOperation(SCMBasedRetriever.java:222)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever.doRetrieve(SCMBasedRetriever.java:199)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.SCMRetriever.retrieve(SCMRetriever.java:65)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:297)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:156)
10:26:14 at PluginClassLoader for pipeline-groovy-lib//org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125)
10:26:14 at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
10:26:14 at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
10:26:14 at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
10:26:14 at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
10:26:14 at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
10:26:14 at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
10:26:14 at PluginClassLoader for script-security//org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox$Scope.parse(GroovySandbox.java:162)
10:26:14 at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:202)
10:26:14 at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:186)
10:26:14 at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:670)
10:26:14 at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:616)
10:26:14 at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:344)
10:26:14 at hudson.model.ResourceController.execute(ResourceController.java:97)
10:26:14 at hudson.model.Executor.run(Executor.java:456)
10:26:14 Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- ssh://git@hidden.domain.name:7722/util/jenkins-shared-library.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
10:26:14 stdout:
10:26:14 stderr: /var/jenkins_home/jobs/Security Checks (OWASP) for My project/workspace@libs/ce6aa583a2c907f1310d861761a4b6d8b91b873ed4d7d0035e1d9a62a809fdcb@tmp/jenkins-gitclient-ssh2608752526904972336.sh-copy: 6: Syntax error: "(" unexpected
10:26:14 fatal: Could not read from remote repository.
Anything else?
The error went away after removing the parentheses from the job names. However parentheses in job names did not use to cause any issues before, so this seems to be a bug/regression.
Are you interested in contributing a fix?
No response
Jenkins and plugins versions report
Environment
Note: The problem occurred after rebuilding the container one day ago, so it was probably introduced in a recent publication of the tag.
What Operating System are you using (both controller, and any agents involved in the problem)?
Using docker image jenkins/jenkins:lts-jdk21 on Ubuntu host
Reproduction steps
Expected Results
Job should run without problems (and it used to work since years)
Actual Results
Git checkout fails with
Syntax error: "(" unexpectedFull output:
Anything else?
The error went away after removing the parentheses from the job names. However parentheses in job names did not use to cause any issues before, so this seems to be a bug/regression.
Are you interested in contributing a fix?
No response