-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
git plugin 4.5.0
The git pipeline steps documentation states that it checks out the default branch if none is specified:
This doesn't seem to be true, as a repo without master branch will cause the error:
... [Pipeline] { [Pipeline] git using credential credentialId Cloning the remote Git repository remote: Enumerating objects remote: Counting objects remote: Compressing objects Receiving objects Resolving deltas [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Affected pipeline snippet:
git credentialsId: 'credentialId', url: 'https://github.com/orgname/reponame'
This worked:
git credentialsId: 'credentialId', url: 'https://github.com/orgname/reponame', branch: 'default-branchname-specified-explicitly'
- links to
[JENKINS-64320] git pipeline step fails to check out default branch in a repo without master branch
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR 1006 - correct the help text (Web Link)" [ 26336 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: git plugin 4.5.0 | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Closed [ 6 ] |