Cloudflare Pages: Cloning git repository Failed

Hi there,

I’m trying to deploy a project on cloudflare pages but it fails to clone the git repo

Here’s the build log:

> Initializing build environment. This may take up to a few minutes to complete
> Success: Finished initializing build environment
> Cloning repository...
> Failed: an internal error occurred

Please help, very keen to understand how I can fix this.

Do you have any files exceeding 25MB? If you join the Discord it would be easier to help and if any of the team are around they could also look into it. The invite is: https://discord.gg/cloudflaredev

I’m having this exact same issue. Trying to deploy a Hugo blog.

I’ve had this occasionally happen despite not having files exceeding 25mb. Usually clears for me with another commit causing a new attempt. I noticed if you ask it to retry it simply rebuilds your production branch…not exactly helpful when it fails on a non-production branch.

Thank you! Pushing another commit seems to have fixed it. Wish I had more insight on what’s causing this, but at least it’s working now. :slightly_smiling_face:

I have these same issues and my largest file is

11K.

And I have done multiple pushes and it still doesn’t work.

I think I fixed it for me.

It was due to the ROOT
i was migrating from GitLab pages
and I tried to set the root directory to something /top-level
setting Root directory: / back to / seemed to resolve the issue
not sure why that would cause it to fail.

Having the same issue here. We have ~10 projects in our account and all of them are working correctly.

Useful info:

  • du -sh return less than 9mb for the build folder
  • commit again in the same branch does not fix the problem
  • setting Root directory to / does not fix the problem

Have no clue about the problem - there is no useful information to keep debugging.