Jenkins not able to fetch code from remote git Jenkins not able to fetch code from remote git jenkins jenkins

Jenkins not able to fetch code from remote git


I was seeing the same issue, but disk space and VM memory were not the problem. What fixed it for me was making the job re-clone on build:

  1. Go to the job's "Configure" page
  2. Under Source Code Management → Git → Additional Behaviors, add a behavior "Wipe out repository & force clone"
  3. Save
  4. Build


Experienced it when Jenkins VM was running out of disk space. Cleaned it up, don't see this problem anymore.


Try clearing out the workspace files and rebuilding.