# BitBucket PR/Builds failing to checkout on PR and Normal Deployment after upgradting Jenkins 2.568.2 

**URL:** <https://community.jenkins.io/t/bitbucket-pr-builds-failing-to-checkout-on-pr-and-normal-deployment-after-upgradting-jenkins-2-568-2/37286>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [September 20, 2026, 1:41pm UTC](https://community.jenkins.io/t/bitbucket-pr-builds-failing-to-checkout-on-pr-and-normal-deployment-after-upgradting-jenkins-2-568-2/37286 "2026-09-20T13:41:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![veena.chaudhari](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@veena.chaudhari](https://community.jenkins.io/u/veena.chaudhari)\
**Post date:** [September 20, 2026, 1:41pm UTC](https://community.jenkins.io/t/bitbucket-pr-builds-failing-to-checkout-on-pr-and-normal-deployment-after-upgradting-jenkins-2-568-2/37286/1 "2026-09-20T13:41:41Z")

</div>

We are getting below error after any build/PR is triggered from bitbucket, when we retrigger it manually sometimes it works and sometimes it does not

> git --version # timeout=10  
> git --version # ‘git version 2.52.0’  
> using GIT\_ASKPASS to set credentials LDAP-BB-AUTH-CREDS (created 28/07/2026)  
> git fetch --no-tags --force --progress – bitbucket-url refs/heads/:refs/remotes/origin/ +refs/pull-requests/6780/from:refs/remotes/origin/PR-6780 # timeout=10  
> ERROR: Error cloning remote repo ‘origin’  
> hudson.plugins.git.GitException: Command “git fetch --no-tags --force --progress – bitbucket-url +refs/heads/:refs/remotes/origin/ +refs/pull-requests/6780/from:refs/remotes/origin/PR-6780” returned status code 128:  
> stdout:  
> stderr: fatal: couldn’t find remote ref refs/pull-requests/6780/from  
> at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)  
> at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2193)  
> at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:638)  
> at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:880)  
> at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1220)  
> at PluginClassLoader for git//hudson.plugins.git.GitSCM.\_checkout(GitSCM.java:1310)  
> at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)  
> at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)  
> at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:168)  
> at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:148)  
> at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:342)  
> at hudson.model.ResourceController.execute(ResourceController.java:97)  
> at hudson.model.Executor.run(Executor.java:456)  
> ERROR: Error cloning remote repo ‘origin’  
> ERROR: Maximum checkout retry attempts reached, aborting  
> ERROR: Error cloning remote repo ‘origin’  
> ERROR: Maximum checkout retry attempts reached, aborting  
> Finished: FAILURE

Jenkins setup:  
Branch source plugin: cloudbees-bitbucket-branch-source (937.3.10)  
Jenkins 2.568.2

---

<div class="post-metadata">

**Author:** ![rachelwilson](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@rachelwilson](https://community.jenkins.io/u/rachelwilson)\
**Post date:** [October 22, 2026, 11:29am UTC](https://community.jenkins.io/t/bitbucket-pr-builds-failing-to-checkout-on-pr-and-normal-deployment-after-upgradting-jenkins-2-568-2/37286/2 "2026-10-22T11:29:58Z")

</div>

that error means the ref wasn’t on the remote when git fetched, not a credentials problem. check with git ls-remote for refs/pull-requests/6780/from while the PR is open. if it shows up later, the webhook is firing before bitbucket creates that ref, which fits a manual retrigger sometimes working.
