Possibility to ignore git submodules

I have a Git repository linked to a Netlify site. The repository includes several Git submodules, but these submodules are not required for building or deploying the website. (It’s a monorepo, and the website is only a part of it.)

The issue is that the submodules point to private Git repositories, so Netlify’s checkout process fails because it doesn’t have the required permissions. Unfortunately, I can’t add the necessary credentials to Netlify to allow it to access these submodules.

Is there a way to prevent Netlify from trying to checkout the submodules, or at least configure it to continue the build even if the submodules aren’t available?

The ignore command might be a solution in this case:

Let us know if that’s a feasible solution for you!

Thanks for the suggestion. How does this ignore command helps? The build already fails at the git-checkout stage since it’s not able to checkout the submodules.

I don’t believe it’s possible to ignore a submodule unless the standard npm install command has a way to ignore it. This is our documentation on git submodules:

We also support npm flags that you can pass during installation time:

Thanks, but the problem is that it fails already at checkout and thus it is not possible to run any build commands. I couldn’t find any option to customize the checkout command. Is there one?