Error checking out submodules: fatal: No url found for submodule path 'website' in .gitmodules

I need advice to debug deploy Netlify App

Error:
Error checking out submodules: fatal: No url found for submodule path ‘website’ in .gitmodules

Hi, @rb442e, this is a public repo so I cloned the repo and ran git submodule status and I see the same error there:

$ git submodule status
fatal: no submodule mapping found in .gitmodules for path 'website'

This is an issue with the repo itself and not something Netlify is causing. The directory named website is causing this issue. This can be seen with the following:

$ git ls-files --stage | grep 160000
160000 29ec3dc543d9fd6b093137260b94ace614355b27 0	website

I found the command above here:

You will need to remove this directory (and add it back again if it is required) to resolve this. If there are other questions, please let us know.

I appreciate the detailed problem-solving here, but I’m coming up with the same error:

1:47:58 PM: Error checking out submodules: fatal: No url found for submodule path ‘HSA’ in .gitmodules
1:47:58 PM: Failing build: Failed to prepare repo
1:47:58 PM: Failed during stage ‘preparing repo’: Error checking out submodules: fatal: No url found for submodule path ‘HSA’ in .gitmodules
: exit status 128

I can only assume that I made a mistake adding folders into RStudio, but I cannot find submodules to correct using the commands referenced on this thread. Help? I’m totally stuck and so new to this that I assume I simply don’t understand the language.

hi @catherine, luke is out until the beginning of the new year, but lets get some troubleshooting started. could you post your .gitmodules file please?

I’m not sure where to find my .gitmodules files - I’ve been trying to find them, actually. I’m on using windows, does that make a difference in how I can call them up?

when I use my git shell in RStudio to run
git rm --cached <path_to_submodule>

I get

The syntax of the command is incorrect.

Hi, @catherine. This is the same issue:

Your repository is public but I’m not sharing the real URL here because you haven’t done so first. Please replace the actual path for your GitHub repo for <repo path here> in the example below.

Here is a reproduction:

$ git clone <repo path here>
Cloning into 'HSA'...
remote: Enumerating objects: 227, done.
remote: Counting objects: 100% (227/227), done.
remote: Compressing objects: 100% (153/153), done.
remote: Total 227 (delta 88), reused 183 (delta 55), pack-reused 0
Receiving objects: 100% (227/227), 642.69 KiB | 10.04 MiB/s, done.
Resolving deltas: 100% (88/88), done.
$ cd HSA
$ git ls-files --stage | grep 160000
160000 a516bd7723274c40a2e2544bd979b3a4be02f572 0	HSA

This shows the 160000 mode directory mentioned in the StackOverflow post.

You will need to use the solution in the StackOverflow post of above to resolve this.

If there are other questions or concerns, please let us know.

Hi, I got the same issue and here is how I resolve this issue:

  1. Delete the theme folder locally.
  2. Push the change to git.
  3. Re-install the theme using this method:
    git submodule add --depth=1 https://github.com/link_to_your_favorite_theme.git themes/theme_name
    git submodule update --init --recursive
  4. Now when you check the git status, there should be a file name .gitmodules and the newly cloned theme folder in your local repo.
  5. Push the change to git and everything should be fine now.

thanks for sharing your solution with the community!