This problem is due to a submodule, pointing to an unreachable remote location.
Changed directory to the offending dir:
cd <offending git submodule>
Remove the .git directory inside it:
rm -rf .git
Update the git cache:
git rm --cached <offending git submodule>
Go to the parent directory:
cd ..
Add the directory to git:
git add .
git commit -m "Changed submodule to directory"
git push --all