jenkinsci / jenkinsci/git-plugin

[JENKINS-32143] Set git merge timeout

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

Description

When using Merge Before Build, sometimes throws error:

git merge --ff df24f37fedf6048881cc0683a782c975b0bd8db7 # timeout=10

ERROR: Timeout after 10 minutes

> git config core.sparsecheckout # timeout=10

> git checkout -f df24f37fedf6048881cc0683a782c975b0bd8db7 # timeout=20

FATAL: Could not lock repository. Please try again

and next build in the same workspace is failed with error:

FATAL: Could not lock repository. Please try again

This happens because my repositore is very big. I want set a merge timeout or kill git process before next try.

Thanks

---
Originally reported by da_ryazancev, imported from: Set git merge timeout


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

Raw content of original issue

When using Merge Before Build, sometimes throws error:
git merge --ff df24f37fedf6048881cc0683a782c975b0bd8db7 # timeout=10
ERROR: Timeout after 10 minutes
> git config core.sparsecheckout # timeout=10
> git checkout -f df24f37fedf6048881cc0683a782c975b0bd8db7 # timeout=20
FATAL: Could not lock repository. Please try again

and next build in the same workspace is failed with error:
FATAL: Could not lock repository. Please try again

This happens because my repositore is very big. I want set a merge timeout or kill git process before next try.
Thanks

  • environment: windows

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.