# Checkout configuration in declarative multi branch pipeline

**URL:** <https://community.jenkins.io/t/checkout-configuration-in-declarative-multi-branch-pipeline/30466>\
**Category:** Ask a question\
**Tags:** pipeline\
**Created:** [April 28, 2025, 11:43pm UTC](https://community.jenkins.io/t/checkout-configuration-in-declarative-multi-branch-pipeline/30466 "2025-04-28T23:43:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnbond](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gnbond/32/14559_2.png) [@gnbond](https://community.jenkins.io/u/gnbond)\
**Post date:** [April 28, 2025, 11:43pm UTC](https://community.jenkins.io/t/checkout-configuration-in-declarative-multi-branch-pipeline/30466/1 "2025-04-28T23:43:03Z")

</div>

We have a multibranch declarative pipeline, using gitea plugin as the SCM.

When a new node is allocated, Jenkins does a complex series of git commands to create the workspace. This includes `git fetch --no-tags`, but we’d really like tags on the repo (so we can properly version artefacts with the release tag, if it is present).

Current workaround is to put an explicit `git fetch --tags` in the relevant steps.

Is there a better way to modify the default checkout behaviour for a declarative pipeline?

Jenkins setup: (old and needs updating, I know)  
Jenkins 2.426.3  
Gitea 1.4.7  
Git 4.7.0  
Branch 2.1178

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [April 29, 2025, 5:25am UTC](https://community.jenkins.io/t/checkout-configuration-in-declarative-multi-branch-pipeline/30466/2 "2025-04-29T05:25:05Z")

</div>

If you are using a Gitea Organization Folder, then you can add the additional clone behavior that will fetch tags.

My screen looks like this:

 ![screenshot](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/f/fc8e0604f1b23be860e47c79e1b95c556932d66a.png)

---

<div class="post-metadata">

**Author:** ![gnbond](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gnbond/32/14559_2.png) [@gnbond](https://community.jenkins.io/u/gnbond)\
**Post date:** [April 30, 2025, 3:34am UTC](https://community.jenkins.io/t/checkout-configuration-in-declarative-multi-branch-pipeline/30466/3 "2025-04-30T03:34:33Z")

</div>

Thanks Mark, that has solved it for us.
