I am trying to clone a submodule for my drupal installation. I run the following command:
git submodule add http://git.drupal.org/project/token.git /sites/all/modules/token
This throws this error:
The following path is ignored by one of your .gitignore files:
/sites/all/modules/token
Use -f if you really want to add it.
But my .gitignore file is empty.
So I tried to run it as suggested:
submodule add -f http://git.drupal.org/project/token.git /sites/all/modules/token
But this throws this error:
fatal: could not create leading directories of '/sites/all/modules/token': Permission denied
Clone of 'http://git.drupal.org/project/token.git' into submodule path '/sites/all/modules/token' failed
Permissions are 777.
Ideas?
Regards
Lukas
Just found the answer:
The leading “/” was the problem.