jenkinsci / jenkinsci/git-plugin

[JENKINS-69564] Cannot configure multiple glob fetch refspecs in Git plugin with '*' embedded inside the refspec

Open
#3,751 7 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 am trying to set up refspecs for a project according to this guide, and they specify two glob refspecs to be used:

+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*


However, I just get a "Specification is invalid" after entering these and cannot proceed.

Each refspec individually works, just adding them both at the same time does not. Adding two refspecs w/o globs also works.

---
Originally reported by emike922, imported from: Cannot configure multiple glob fetch refspecs in Git plugin with '*' embedded inside the refspec


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

Raw content of original issue

I am trying to set up refspecs for a project according to this guide, and they specify two glob refspecs to be used:



+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*



However, I just get a "Specification is invalid" after entering these and cannot proceed.

Each refspec individually works, just adding them both at the same time does not. Adding two refspecs w/o globs also works.

environment

```
Jenkins: jenkins/jenkins:2.361.1-jdk11 (in docker)

Git plugin: 4.11.5
```

1 attachment

- [image-2022-09-09-16-24-56-443.png](https://issues.jenkins.io/secure/attachment/59052/image-2022-09-09-16-24-56-443.png)
> ![image-2022-09-09-16-24-56-443.png](https://issues.jenkins.io/secure/attachment/59052/image-2022-09-09-16-24-56-443.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.