No url found for submodule path in .gitmodules
#354 is still a problem for self-hosted runners specifically
I'm using actions/checkout@v3 and getting
Error: fatal: No url found for submodule path 'vendor/mapbox-gl-native-curl' in .gitmodules
With a recently deleted submodule.
Deleting the actions-worker/_work directory seems to have solved the problem, but I don't want to have to keep doing this is we delete more submodules in the future.
Ran into this with an invalid submodule that was accidentally introduced to our repo. It only happens with persist-credentials: false set. https://github.com/GoogleCloudPlatform/magic-modules/actions/runs/11058094944/job/30723349995#step:3:68
Deleting the
actions-worker/_workdirectory seems to have solved the problem
Doesn't work for me.
@dscho I wonder if you might help me get git or actions/checkout to handle persist-credentials: false (which trips on git submodule foreach) better?
I've worked around this problem in: https://github.com/check-spelling-sandbox/check-spelling/commit/6bbb7ebc7d30da63705fb5ca0fe7059a62931980
Here's a sample repository with the problem: https://github.com/check-spelling-sandbox/editorconfig-gedit/actions/runs/14555001851/job/40871712077
Here's my action before and after apply my fix
I'm going to try to add a test to at least https://github.com/git/git/blob/master/contrib/subtree/t/t7900-subtree.sh.
Offhand, my preference would be for git submodule foreach to not die under these circumstances. As there don't seem to be any other ways for a generic git consumer to deal with this problem short of doing something like what I'm doing (which is very hacky).
@joshmgross before you change persist-credentials, this needs to be fixed.
@jsoref I lack the time to support actions/checkout; Besides, I am no longer working inside GitHub.