jenkinsci / jenkinsci/git-plugin

[JENKINS-62019] Parameter is not interpreted in GIT Plugin - Branch Specifier

Open
#3,550 13 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

I have a pipeline with one branch to be build, it's a parameterized pipeline:

Parameter BuildTag is not used by branch specifier.

refs/tags/${BuildTag}

 

hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune -- origin +refs/tags/${BuildTag}:refs/remotes/origin/${BuildTag}" returned status code 128:

stdout:
stderr: fatal: Couldn't find remote ref refs/tags/${BuildTag}
fatal: the remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2430)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2044)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:81)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:569)
at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:361)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:197)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:173)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:115)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:69)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Finished: FAILURE

It worked with Git Plugin 4.1.1 and when I restore the plugin to this version it starts to work again!

Regards Alex

---
Originally reported by alexz707, imported from: Parameter is not interpreted in GIT Plugin - Branch Specifier


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • label(s): git
  • resolution: Unresolved
  • votes: 3
  • watchers: 5
  • imported: 2025-12-02

Raw content of original issue

I have a pipeline with one branch to be build, it's a parameterized pipeline:

Parameter BuildTag is not used by branch specifier.

refs/tags/${BuildTag}

 



hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune -- origin +refs/tags/${BuildTag}:refs/remotes/origin/${BuildTag}" returned status code 128:

stdout:
stderr: fatal: Couldn't find remote ref refs/tags/${BuildTag}
fatal: the remote end hung up unexpectedly at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2430)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2044)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:81)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:569)
at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:361)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:197)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:173)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:115)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:69)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Finished: FAILURE


It worked with Git Plugin 4.1.1 and when I restore the plugin to this version it starts to work again!

Regards Alex

  • environment: Git-Plugin: 4.2.2

2 attachments

- [image-2021-01-13-21-16-40-957.png](https://issues.jenkins.io/secure/attachment/53821/image-2021-01-13-21-16-40-957.png)
> ![image-2021-01-13-21-16-40-957.png](https://issues.jenkins.io/secure/attachment/53821/image-2021-01-13-21-16-40-957.png)
- [image-2021-01-13-21-18-23-168.png](https://issues.jenkins.io/secure/attachment/53822/image-2021-01-13-21-18-23-168.png)
> ![image-2021-01-13-21-18-23-168.png](https://issues.jenkins.io/secure/attachment/53822/image-2021-01-13-21-18-23-168.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.