jenkinsci / jenkinsci/git-plugin

[JENKINS-67920] Jenkins multibranch pipeline's "Fetching origin" obtains outdated Jenkinsfile

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

Description

We are observing a issue never encountered before when setting up a new multibranch pipeline and pointing it to git repository and Jenkinsfile within that.

Everything looks fine at first, the master branch is found and listed and the project successfully builds. But at a closer look, the Jenkinsfile gets retrieved from a very outdated revision, almost 2 years old.

```
16:38:24 Setting origin to https://example.com/bitbucket/scm/myproj/myrepo.git
16:38:24 Fetching origin...
16:38:33 Obtained tools/jenkins/Jenkinsfile from f10313a3d583e2a3e640e51cee42b259f456d919

```

The revision 'f10313a3d583e2a3e640e51cee42b259f456d919' that gets logged here in fact exists. But why did Jenkins return this old revision and not the latest one? And what exactly is Jenkins doing when "Fetching origin"?

Our version of Jenkins is 2.249.1 and we use Git plugin version 4.4.4

Regards

Dominik

---
Originally reported by dokaspar, imported from: Jenkins multibranch pipeline's "Fetching origin" obtains outdated Jenkinsfile


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

Raw content of original issue

We are observing a issue never encountered before when setting up a new multibranch pipeline and pointing it to git repository and Jenkinsfile within that.

Everything looks fine at first, the master branch is found and listed and the project successfully builds. But at a closer look, the Jenkinsfile gets retrieved from a very outdated revision, almost 2 years old.



16:38:24  Setting origin to https://example.com/bitbucket/scm/myproj/myrepo.git

16:38:24 Fetching origin...
16:38:33 Obtained tools/jenkins/Jenkinsfile from f10313a3d583e2a3e640e51cee42b259f456d919


The revision 'f10313a3d583e2a3e640e51cee42b259f456d919' that gets logged here in fact exists. But why did Jenkins return this old revision and not the latest one? And what exactly is Jenkins doing when "Fetching origin"?

Our version of Jenkins is 2.249.1 and we use Git plugin version 4.4.4

Regards
Dominik

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.