Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'fatal: No url found for submodule path' error when trying to init submodule

The name of the repository that I am using as a submodule in my current repository is droid-media-lib, but the name of the directory into which this submodule is put into is library so my .gitmodules looks like this

[submodule "droid-media-lib"]
        path = library/
        url = https://github.com/talview/droid-media-lib.git

Now when I am trying to clone this project on a different computer, and do

git submodule update --init

I get this error

fatal: No url found for submodule path 'library' in .gitmodules

What I've tried so far:

  • I've tried changing submodule "droid-media-lib" to submodule "library", still getting same error.

  • I've tried renaming the library directory name to droid-media-lib and setting the same value in path as path = droid-media-lib/" , but surprisingly the error message stays the same with "library" in it, I don't understand where its reading the "library" string from?

like image 726
Bhargav Avatar asked Dec 12 '16 13:12

Bhargav


1 Answers

Submodule paths may not end in a slash.

path=library/

is an invalid configuration, instead you can have:

path=library
like image 138
DUman Avatar answered Sep 18 '22 14:09

DUman